]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mfd: twl-core: Fix clock initialization
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 9 Apr 2018 08:45:39 +0000 (11:45 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
BugLink: http://bugs.launchpad.net/bugs/1807469
commit c218b3b242bd04539621b468f01ecd2af5a21a45 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/mfd/twl-core.c

index d3133a371e277f0bd8f20bcafa648c5f41ebf180..c649344fd7f25543a676a89455f61a68893a289e 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()) {