diff options
Diffstat (limited to 'drivers/net/can/flexcan.c')
-rw-r--r-- | drivers/net/can/flexcan.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 0f88cd3bb92..b429b3f3fa7 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -938,14 +938,9 @@ static int __devinit flexcan_probe(struct platform_device *pdev) if (IS_ERR(pinctrl)) return PTR_ERR(pinctrl); - if (pdev->dev.of_node) { - const __be32 *clock_freq_p; - - clock_freq_p = of_get_property(pdev->dev.of_node, - "clock-frequency", NULL); - if (clock_freq_p) - clock_freq = be32_to_cpup(clock_freq_p); - } + if (pdev->dev.of_node) + of_property_read_u32(pdev->dev.of_node, + "clock-frequency", &clock_freq); if (!clock_freq) { clk = clk_get(&pdev->dev, NULL); |