diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-28 16:00:15 +0100 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2016-01-25 05:16:53 +0100 |
commit | d58593426e5cf41009f2e9d6eec3f47fe0cbedeb (patch) | |
tree | ffbd35cd7a684850cf00e1ae0b00537ebf24ebad /drivers/extcon/extcon-rt8973a.c | |
parent | Linux 4.5-rc1 (diff) | |
download | linux-d58593426e5cf41009f2e9d6eec3f47fe0cbedeb.tar.xz linux-d58593426e5cf41009f2e9d6eec3f47fe0cbedeb.zip |
extcon: Use to_i2c_client for both rt8973a and sm5502
Use to_i2c_client() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-rt8973a.c')
-rw-r--r-- | drivers/extcon/extcon-rt8973a.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/extcon/extcon-rt8973a.c b/drivers/extcon/extcon-rt8973a.c index e1bb82809bef..7635a8eaf4c6 100644 --- a/drivers/extcon/extcon-rt8973a.c +++ b/drivers/extcon/extcon-rt8973a.c @@ -663,7 +663,7 @@ MODULE_DEVICE_TABLE(of, rt8973a_dt_match); #ifdef CONFIG_PM_SLEEP static int rt8973a_muic_suspend(struct device *dev) { - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); + struct i2c_client *i2c = to_i2c_client(dev); struct rt8973a_muic_info *info = i2c_get_clientdata(i2c); enable_irq_wake(info->irq); @@ -673,7 +673,7 @@ static int rt8973a_muic_suspend(struct device *dev) static int rt8973a_muic_resume(struct device *dev) { - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); + struct i2c_client *i2c = to_i2c_client(dev); struct rt8973a_muic_info *info = i2c_get_clientdata(i2c); disable_irq_wake(info->irq); |