summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/atmel-ecc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/atmel-ecc.c')
-rw-r--r--drivers/crypto/atmel-ecc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/crypto/atmel-ecc.c b/drivers/crypto/atmel-ecc.c
index ba00e4563ca0..5705348f540f 100644
--- a/drivers/crypto/atmel-ecc.c
+++ b/drivers/crypto/atmel-ecc.c
@@ -657,11 +657,14 @@ static int atmel_ecc_probe(struct i2c_client *client,
return -ENODEV;
}
- ret = of_property_read_u32(client->adapter->dev.of_node,
- "clock-frequency", &bus_clk_rate);
- if (ret) {
- dev_err(dev, "of: failed to read clock-frequency property\n");
- return ret;
+ clk_rate = i2c_acpi_find_bus_speed(&client->adapter->dev);
+ if (!clk_rate) {
+ ret = device_property_read_u32(&client->adapter->dev,
+ "clock-frequency", &bus_clk_rate);
+ if (ret) {
+ dev_err(dev, "failed to read clock-frequency property\n");
+ return ret;
+ }
}
if (bus_clk_rate > 1000000L) {