Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: stu300: do not request a specific clock name

We have used the default clock associated with the block
for a long time, only heuristics in the clock system has
made this work anyway. This needs to be done away with as
we start probing this driver and its clocks exclusively
from the device tree.

Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

+1 -3
+1 -3
drivers/i2c/busses/i2c-stu300.c
··· 868 868 struct resource *res; 869 869 int bus_nr; 870 870 int ret = 0; 871 - char clk_name[] = "I2C0"; 872 871 873 872 dev = devm_kzalloc(&pdev->dev, sizeof(struct stu300_dev), GFP_KERNEL); 874 873 if (!dev) { ··· 876 877 } 877 878 878 879 bus_nr = pdev->id; 879 - clk_name[3] += (char)bus_nr; 880 - dev->clk = devm_clk_get(&pdev->dev, clk_name); 880 + dev->clk = devm_clk_get(&pdev->dev, NULL); 881 881 if (IS_ERR(dev->clk)) { 882 882 dev_err(&pdev->dev, "could not retrieve i2c bus clock\n"); 883 883 return PTR_ERR(dev->clk);