diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2410/clock.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index f59608268751..8b3d5dc35de5 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c | |||
@@ -98,7 +98,10 @@ struct clk *clk_get(struct device *dev, const char *id) | |||
98 | struct clk *clk = ERR_PTR(-ENOENT); | 98 | struct clk *clk = ERR_PTR(-ENOENT); |
99 | int idno; | 99 | int idno; |
100 | 100 | ||
101 | idno = (dev == NULL) ? -1 : to_platform_device(dev)->id; | 101 | if (dev == NULL || dev->bus != &platform_bus_type) |
102 | idno = -1; | ||
103 | else | ||
104 | idno = to_platform_device(dev)->id; | ||
102 | 105 | ||
103 | down(&clocks_sem); | 106 | down(&clocks_sem); |
104 | 107 | ||