diff mbox

[v2] mfd: twl-core: Fix clock initialization

Message ID 20180409084539.14365-1-peter.ujfalusi@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Ujfalusi April 9, 2018, 8:45 a.m. UTC
When looking up the clock we must use the client->dev as device since that
is the one which is probed via DT.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: stable@vger.kernel.org # 4.16+
---
Hi,

Changes since v1:
- Removed the Fixes line and add tag only for v4.16 to avoid possible breakage
  in pre v4.16.
 
Regards,
Peter

 drivers/mfd/twl-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lee Jones April 16, 2018, 2:07 p.m. UTC | #1
On Mon, 09 Apr 2018, Peter Ujfalusi wrote:

> When looking up the clock we must use the client->dev as device since that
> is the one which is probed via DT.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Cc: stable@vger.kernel.org # 4.16+
> ---
> Hi,
> 
> Changes since v1:
> - Removed the Fixes line and add tag only for v4.16 to avoid possible breakage
>   in pre v4.16.
>  
> Regards,
> Peter
> 
>  drivers/mfd/twl-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index d3133a371e27..c649344fd7f2 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -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()) {