summaryrefslogtreecommitdiff
path: root/drivers/extcon/extcon-sm5502.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-28 23:00:15 +0800
committerChanwoo Choi <cw00.choi@samsung.com>2016-01-25 13:16:53 +0900
commitd58593426e5cf41009f2e9d6eec3f47fe0cbedeb (patch)
treeffbd35cd7a684850cf00e1ae0b00537ebf24ebad /drivers/extcon/extcon-sm5502.c
parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
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-sm5502.c')
-rw-r--r--drivers/extcon/extcon-sm5502.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
index 7aac3cc7efd7..571de2e6e7c4 100644
--- a/drivers/extcon/extcon-sm5502.c
+++ b/drivers/extcon/extcon-sm5502.c
@@ -655,7 +655,7 @@ MODULE_DEVICE_TABLE(of, sm5502_dt_match);
#ifdef CONFIG_PM_SLEEP
static int sm5502_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 sm5502_muic_info *info = i2c_get_clientdata(i2c);
enable_irq_wake(info->irq);
@@ -665,7 +665,7 @@ static int sm5502_muic_suspend(struct device *dev)
static int sm5502_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 sm5502_muic_info *info = i2c_get_clientdata(i2c);
disable_irq_wake(info->irq);