OSDN Git Service

mfd: twl-core: Fix clock initialization
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 9 Apr 2018 08:45:39 +0000 (11:45 +0300)
committerLee Jones <lee.jones@linaro.org>
Wed, 16 May 2018 08:21:48 +0000 (09:21 +0100)
When looking up the clock we must use the client->dev as device since that
is the one which is probed via DT.

Cc: stable@vger.kernel.org # 4.16+
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/twl-core.c

index d3133a3..c649344 100644 (file)
@@ -1177,7 +1177,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
        twl_priv->ready = true;
 
        /* setup clock framework */
-       clocks_init(&pdev->dev, pdata ? pdata->clock : NULL);
+       clocks_init(&client->dev, pdata ? pdata->clock : NULL);
 
        /* read TWL IDCODE Register */
        if (twl_class_is_4030()) {