* [PATCH 1/3] mfd: use to_i2c_client
@ 2015-12-28 15:00 Geliang Tang
2015-12-28 15:00 ` [PATCH 2/3] extcon: rt8973a, sm5502: " Geliang Tang
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Geliang Tang @ 2015-12-28 15:00 UTC (permalink / raw)
To: Lee Jones, Chanwoo Choi, Krzysztof Kozlowski, Sangbeom Kim
Cc: Geliang Tang, linux-kernel, linux-samsung-soc
Use to_i2c_client() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/mfd/88pm80x.c | 4 ++--
drivers/mfd/88pm860x-core.c | 4 ++--
drivers/mfd/max14577.c | 4 ++--
drivers/mfd/max77686.c | 4 ++--
drivers/mfd/max77693.c | 4 ++--
drivers/mfd/max77843.c | 4 ++--
drivers/mfd/max8925-i2c.c | 4 ++--
drivers/mfd/max8997.c | 8 ++++----
drivers/mfd/max8998.c | 8 ++++----
drivers/mfd/sec-core.c | 4 ++--
10 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/mfd/88pm80x.c b/drivers/mfd/88pm80x.c
index 63445ea..3f24ecb 100644
--- a/drivers/mfd/88pm80x.c
+++ b/drivers/mfd/88pm80x.c
@@ -135,7 +135,7 @@ EXPORT_SYMBOL_GPL(pm80x_deinit);
#ifdef CONFIG_PM_SLEEP
static int pm80x_suspend(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct pm80x_chip *chip = i2c_get_clientdata(client);
if (chip && chip->wu_flag)
@@ -147,7 +147,7 @@ static int pm80x_suspend(struct device *dev)
static int pm80x_resume(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct pm80x_chip *chip = i2c_get_clientdata(client);
if (chip && chip->wu_flag)
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index 3269a99..e497cee 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -1218,7 +1218,7 @@ static int pm860x_remove(struct i2c_client *client)
#ifdef CONFIG_PM_SLEEP
static int pm860x_suspend(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct pm860x_chip *chip = i2c_get_clientdata(client);
if (device_may_wakeup(dev) && chip->wakeup_flag)
@@ -1228,7 +1228,7 @@ static int pm860x_suspend(struct device *dev)
static int pm860x_resume(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct pm860x_chip *chip = i2c_get_clientdata(client);
if (device_may_wakeup(dev) && chip->wakeup_flag)
diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c
index 56e216d..2280b3f 100644
--- a/drivers/mfd/max14577.c
+++ b/drivers/mfd/max14577.c
@@ -495,7 +495,7 @@ MODULE_DEVICE_TABLE(i2c, max14577_i2c_id);
#ifdef CONFIG_PM_SLEEP
static int max14577_suspend(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max14577 *max14577 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
@@ -516,7 +516,7 @@ static int max14577_suspend(struct device *dev)
static int max14577_resume(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max14577 *max14577 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c
index d19be64..d959ebb 100644
--- a/drivers/mfd/max77686.c
+++ b/drivers/mfd/max77686.c
@@ -352,7 +352,7 @@ MODULE_DEVICE_TABLE(i2c, max77686_i2c_id);
#ifdef CONFIG_PM_SLEEP
static int max77686_suspend(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max77686_dev *max77686 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
@@ -374,7 +374,7 @@ static int max77686_suspend(struct device *dev)
static int max77686_resume(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max77686_dev *max77686 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c
index 007f729..b83b7a7 100644
--- a/drivers/mfd/max77693.c
+++ b/drivers/mfd/max77693.c
@@ -334,7 +334,7 @@ MODULE_DEVICE_TABLE(i2c, max77693_i2c_id);
static int max77693_suspend(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev)) {
@@ -347,7 +347,7 @@ static int max77693_suspend(struct device *dev)
static int max77693_resume(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev)) {
diff --git a/drivers/mfd/max77843.c b/drivers/mfd/max77843.c
index 586098f..7cfc95b 100644
--- a/drivers/mfd/max77843.c
+++ b/drivers/mfd/max77843.c
@@ -197,7 +197,7 @@ MODULE_DEVICE_TABLE(i2c, max77843_id);
static int __maybe_unused max77843_suspend(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max77693_dev *max77843 = i2c_get_clientdata(i2c);
disable_irq(max77843->irq);
@@ -209,7 +209,7 @@ static int __maybe_unused max77843_suspend(struct device *dev)
static int __maybe_unused max77843_resume(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max77693_dev *max77843 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c
index b0fe810..70443b1 100644
--- a/drivers/mfd/max8925-i2c.c
+++ b/drivers/mfd/max8925-i2c.c
@@ -215,7 +215,7 @@ static int max8925_remove(struct i2c_client *client)
#ifdef CONFIG_PM_SLEEP
static int max8925_suspend(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct max8925_chip *chip = i2c_get_clientdata(client);
if (device_may_wakeup(dev) && chip->wakeup_flag)
@@ -225,7 +225,7 @@ static int max8925_suspend(struct device *dev)
static int max8925_resume(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct max8925_chip *chip = i2c_get_clientdata(client);
if (device_may_wakeup(dev) && chip->wakeup_flag)
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 156ed6f..f316348 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -437,7 +437,7 @@ static u8 max8997_dumpaddr_haptic[] = {
static int max8997_freeze(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max8997_dev *max8997 = i2c_get_clientdata(i2c);
int i;
@@ -459,7 +459,7 @@ static int max8997_freeze(struct device *dev)
static int max8997_restore(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max8997_dev *max8997 = i2c_get_clientdata(i2c);
int i;
@@ -481,7 +481,7 @@ static int max8997_restore(struct device *dev)
static int max8997_suspend(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max8997_dev *max8997 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
@@ -491,7 +491,7 @@ static int max8997_suspend(struct device *dev)
static int max8997_resume(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max8997_dev *max8997 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c
index a7afe3b..ab28b29 100644
--- a/drivers/mfd/max8998.c
+++ b/drivers/mfd/max8998.c
@@ -274,7 +274,7 @@ MODULE_DEVICE_TABLE(i2c, max8998_i2c_id);
static int max8998_suspend(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max8998_dev *max8998 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
@@ -284,7 +284,7 @@ static int max8998_suspend(struct device *dev)
static int max8998_resume(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct max8998_dev *max8998 = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
@@ -344,7 +344,7 @@ static struct max8998_reg_dump max8998_dump[] = {
/* Save registers before hibernation */
static int max8998_freeze(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
int i;
for (i = 0; i < ARRAY_SIZE(max8998_dump); i++)
@@ -357,7 +357,7 @@ static int max8998_freeze(struct device *dev)
/* Restore registers after hibernation */
static int max8998_restore(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
int i;
for (i = 0; i < ARRAY_SIZE(max8998_dump); i++)
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index c9802ba..400e1d7 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -536,7 +536,7 @@ static void sec_pmic_shutdown(struct i2c_client *i2c)
#ifdef CONFIG_PM_SLEEP
static int sec_pmic_suspend(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct sec_pmic_dev *sec_pmic = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
@@ -557,7 +557,7 @@ static int sec_pmic_suspend(struct device *dev)
static int sec_pmic_resume(struct device *dev)
{
- struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *i2c = to_i2c_client(dev);
struct sec_pmic_dev *sec_pmic = i2c_get_clientdata(i2c);
if (device_may_wakeup(dev))
--
2.5.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] extcon: rt8973a, sm5502: use to_i2c_client
2015-12-28 15:00 [PATCH 1/3] mfd: use to_i2c_client Geliang Tang
@ 2015-12-28 15:00 ` Geliang Tang
2015-12-29 0:27 ` Chanwoo Choi
2015-12-28 15:00 ` [PATCH 3/3] misc: apds990x, bh1770glc, lis3lv02d: " Geliang Tang
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Geliang Tang @ 2015-12-28 15:00 UTC (permalink / raw)
To: MyungJoo Ham, Chanwoo Choi; +Cc: Geliang Tang, linux-kernel
Use to_i2c_client() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/extcon/extcon-rt8973a.c | 4 ++--
drivers/extcon/extcon-sm5502.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/extcon/extcon-rt8973a.c b/drivers/extcon/extcon-rt8973a.c
index e1bb8280..7635a8e 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);
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
index 7aac3cc..571de2e 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);
--
2.5.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] misc: apds990x, bh1770glc, lis3lv02d: use to_i2c_client
2015-12-28 15:00 [PATCH 1/3] mfd: use to_i2c_client Geliang Tang
2015-12-28 15:00 ` [PATCH 2/3] extcon: rt8973a, sm5502: " Geliang Tang
@ 2015-12-28 15:00 ` Geliang Tang
2015-12-28 23:56 ` [PATCH 1/3] mfd: " Krzysztof Kozlowski
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Geliang Tang @ 2015-12-28 15:00 UTC (permalink / raw)
To: Arnd Bergmann, Greg Kroah-Hartman, Eric Piel; +Cc: Geliang Tang, linux-kernel
Use to_i2c_client() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/misc/apds990x.c | 8 ++++----
drivers/misc/bh1770glc.c | 8 ++++----
drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 8 ++++----
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index a3e789b..dfb72ec 100644
--- a/drivers/misc/apds990x.c
+++ b/drivers/misc/apds990x.c
@@ -1215,7 +1215,7 @@ static int apds990x_remove(struct i2c_client *client)
#ifdef CONFIG_PM_SLEEP
static int apds990x_suspend(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct apds990x_chip *chip = i2c_get_clientdata(client);
apds990x_chip_off(chip);
@@ -1224,7 +1224,7 @@ static int apds990x_suspend(struct device *dev)
static int apds990x_resume(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct apds990x_chip *chip = i2c_get_clientdata(client);
/*
@@ -1240,7 +1240,7 @@ static int apds990x_resume(struct device *dev)
#ifdef CONFIG_PM
static int apds990x_runtime_suspend(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct apds990x_chip *chip = i2c_get_clientdata(client);
apds990x_chip_off(chip);
@@ -1249,7 +1249,7 @@ static int apds990x_runtime_suspend(struct device *dev)
static int apds990x_runtime_resume(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct apds990x_chip *chip = i2c_get_clientdata(client);
apds990x_chip_on(chip);
diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c
index 753d7ec..845466e 100644
--- a/drivers/misc/bh1770glc.c
+++ b/drivers/misc/bh1770glc.c
@@ -1323,7 +1323,7 @@ static int bh1770_remove(struct i2c_client *client)
#ifdef CONFIG_PM_SLEEP
static int bh1770_suspend(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct bh1770_chip *chip = i2c_get_clientdata(client);
bh1770_chip_off(chip);
@@ -1333,7 +1333,7 @@ static int bh1770_suspend(struct device *dev)
static int bh1770_resume(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct bh1770_chip *chip = i2c_get_clientdata(client);
int ret = 0;
@@ -1361,7 +1361,7 @@ static int bh1770_resume(struct device *dev)
#ifdef CONFIG_PM
static int bh1770_runtime_suspend(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct bh1770_chip *chip = i2c_get_clientdata(client);
bh1770_chip_off(chip);
@@ -1371,7 +1371,7 @@ static int bh1770_runtime_suspend(struct device *dev)
static int bh1770_runtime_resume(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct bh1770_chip *chip = i2c_get_clientdata(client);
bh1770_chip_on(chip);
diff --git a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
index 0c3bb7e..14b7d53 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
@@ -209,7 +209,7 @@ static int lis3lv02d_i2c_remove(struct i2c_client *client)
#ifdef CONFIG_PM_SLEEP
static int lis3lv02d_i2c_suspend(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct lis3lv02d *lis3 = i2c_get_clientdata(client);
if (!lis3->pdata || !lis3->pdata->wakeup_flags)
@@ -219,7 +219,7 @@ static int lis3lv02d_i2c_suspend(struct device *dev)
static int lis3lv02d_i2c_resume(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct lis3lv02d *lis3 = i2c_get_clientdata(client);
/*
@@ -238,7 +238,7 @@ static int lis3lv02d_i2c_resume(struct device *dev)
#ifdef CONFIG_PM
static int lis3_i2c_runtime_suspend(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct lis3lv02d *lis3 = i2c_get_clientdata(client);
lis3lv02d_poweroff(lis3);
@@ -247,7 +247,7 @@ static int lis3_i2c_runtime_suspend(struct device *dev)
static int lis3_i2c_runtime_resume(struct device *dev)
{
- struct i2c_client *client = container_of(dev, struct i2c_client, dev);
+ struct i2c_client *client = to_i2c_client(dev);
struct lis3lv02d *lis3 = i2c_get_clientdata(client);
lis3lv02d_poweron(lis3);
--
2.5.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] mfd: use to_i2c_client
2015-12-28 15:00 [PATCH 1/3] mfd: use to_i2c_client Geliang Tang
2015-12-28 15:00 ` [PATCH 2/3] extcon: rt8973a, sm5502: " Geliang Tang
2015-12-28 15:00 ` [PATCH 3/3] misc: apds990x, bh1770glc, lis3lv02d: " Geliang Tang
@ 2015-12-28 23:56 ` Krzysztof Kozlowski
2015-12-29 0:29 ` Chanwoo Choi
2016-01-11 8:00 ` Lee Jones
4 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2015-12-28 23:56 UTC (permalink / raw)
To: Geliang Tang, Lee Jones, Chanwoo Choi, Sangbeom Kim
Cc: linux-kernel, linux-samsung-soc
On 29.12.2015 00:00, Geliang Tang wrote:
> Use to_i2c_client() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> drivers/mfd/88pm80x.c | 4 ++--
> drivers/mfd/88pm860x-core.c | 4 ++--
> drivers/mfd/max14577.c | 4 ++--
> drivers/mfd/max77686.c | 4 ++--
> drivers/mfd/max77693.c | 4 ++--
> drivers/mfd/max77843.c | 4 ++--
> drivers/mfd/max8925-i2c.c | 4 ++--
> drivers/mfd/max8997.c | 8 ++++----
> drivers/mfd/max8998.c | 8 ++++----
> drivers/mfd/sec-core.c | 4 ++--
> 10 files changed, 24 insertions(+), 24 deletions(-)
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] extcon: rt8973a, sm5502: use to_i2c_client
2015-12-28 15:00 ` [PATCH 2/3] extcon: rt8973a, sm5502: " Geliang Tang
@ 2015-12-29 0:27 ` Chanwoo Choi
0 siblings, 0 replies; 7+ messages in thread
From: Chanwoo Choi @ 2015-12-29 0:27 UTC (permalink / raw)
To: Geliang Tang, MyungJoo Ham; +Cc: linux-kernel
On 2015년 12월 29일 00:00, Geliang Tang wrote:
> Use to_i2c_client() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> drivers/extcon/extcon-rt8973a.c | 4 ++--
> drivers/extcon/extcon-sm5502.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
Applied it.
I just modified the patch title as following:
: extcon: rt8973a, sm5502: use to_i2c_client
-> "extcon: Use to i2c_client for both rt8973a and sm5502."
Thanks,
Chanwoo Choi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] mfd: use to_i2c_client
2015-12-28 15:00 [PATCH 1/3] mfd: use to_i2c_client Geliang Tang
` (2 preceding siblings ...)
2015-12-28 23:56 ` [PATCH 1/3] mfd: " Krzysztof Kozlowski
@ 2015-12-29 0:29 ` Chanwoo Choi
2016-01-11 8:00 ` Lee Jones
4 siblings, 0 replies; 7+ messages in thread
From: Chanwoo Choi @ 2015-12-29 0:29 UTC (permalink / raw)
To: Geliang Tang, Lee Jones, Krzysztof Kozlowski, Sangbeom Kim
Cc: linux-kernel, linux-samsung-soc
Hi Geliang,
On 2015년 12월 29일 00:00, Geliang Tang wrote:
> Use to_i2c_client() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> drivers/mfd/88pm80x.c | 4 ++--
> drivers/mfd/88pm860x-core.c | 4 ++--
> drivers/mfd/max14577.c | 4 ++--
> drivers/mfd/max77686.c | 4 ++--
> drivers/mfd/max77693.c | 4 ++--
> drivers/mfd/max77843.c | 4 ++--
> drivers/mfd/max8925-i2c.c | 4 ++--
> drivers/mfd/max8997.c | 8 ++++----
> drivers/mfd/max8998.c | 8 ++++----
> drivers/mfd/sec-core.c | 4 ++--
> 10 files changed, 24 insertions(+), 24 deletions(-)
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Thanks,
Chanwoo Choi
[snip]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] mfd: use to_i2c_client
2015-12-28 15:00 [PATCH 1/3] mfd: use to_i2c_client Geliang Tang
` (3 preceding siblings ...)
2015-12-29 0:29 ` Chanwoo Choi
@ 2016-01-11 8:00 ` Lee Jones
4 siblings, 0 replies; 7+ messages in thread
From: Lee Jones @ 2016-01-11 8:00 UTC (permalink / raw)
To: Geliang Tang
Cc: Chanwoo Choi, Krzysztof Kozlowski, Sangbeom Kim, linux-kernel,
linux-samsung-soc
On Mon, 28 Dec 2015, Geliang Tang wrote:
> Use to_i2c_client() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> drivers/mfd/88pm80x.c | 4 ++--
> drivers/mfd/88pm860x-core.c | 4 ++--
> drivers/mfd/max14577.c | 4 ++--
> drivers/mfd/max77686.c | 4 ++--
> drivers/mfd/max77693.c | 4 ++--
> drivers/mfd/max77843.c | 4 ++--
> drivers/mfd/max8925-i2c.c | 4 ++--
> drivers/mfd/max8997.c | 8 ++++----
> drivers/mfd/max8998.c | 8 ++++----
> drivers/mfd/sec-core.c | 4 ++--
> 10 files changed, 24 insertions(+), 24 deletions(-)
Applied, thanks.
> diff --git a/drivers/mfd/88pm80x.c b/drivers/mfd/88pm80x.c
> index 63445ea..3f24ecb 100644
> --- a/drivers/mfd/88pm80x.c
> +++ b/drivers/mfd/88pm80x.c
> @@ -135,7 +135,7 @@ EXPORT_SYMBOL_GPL(pm80x_deinit);
> #ifdef CONFIG_PM_SLEEP
> static int pm80x_suspend(struct device *dev)
> {
> - struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *client = to_i2c_client(dev);
> struct pm80x_chip *chip = i2c_get_clientdata(client);
>
> if (chip && chip->wu_flag)
> @@ -147,7 +147,7 @@ static int pm80x_suspend(struct device *dev)
>
> static int pm80x_resume(struct device *dev)
> {
> - struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *client = to_i2c_client(dev);
> struct pm80x_chip *chip = i2c_get_clientdata(client);
>
> if (chip && chip->wu_flag)
> diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
> index 3269a99..e497cee 100644
> --- a/drivers/mfd/88pm860x-core.c
> +++ b/drivers/mfd/88pm860x-core.c
> @@ -1218,7 +1218,7 @@ static int pm860x_remove(struct i2c_client *client)
> #ifdef CONFIG_PM_SLEEP
> static int pm860x_suspend(struct device *dev)
> {
> - struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *client = to_i2c_client(dev);
> struct pm860x_chip *chip = i2c_get_clientdata(client);
>
> if (device_may_wakeup(dev) && chip->wakeup_flag)
> @@ -1228,7 +1228,7 @@ static int pm860x_suspend(struct device *dev)
>
> static int pm860x_resume(struct device *dev)
> {
> - struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *client = to_i2c_client(dev);
> struct pm860x_chip *chip = i2c_get_clientdata(client);
>
> if (device_may_wakeup(dev) && chip->wakeup_flag)
> diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c
> index 56e216d..2280b3f 100644
> --- a/drivers/mfd/max14577.c
> +++ b/drivers/mfd/max14577.c
> @@ -495,7 +495,7 @@ MODULE_DEVICE_TABLE(i2c, max14577_i2c_id);
> #ifdef CONFIG_PM_SLEEP
> static int max14577_suspend(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max14577 *max14577 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> @@ -516,7 +516,7 @@ static int max14577_suspend(struct device *dev)
>
> static int max14577_resume(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max14577 *max14577 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c
> index d19be64..d959ebb 100644
> --- a/drivers/mfd/max77686.c
> +++ b/drivers/mfd/max77686.c
> @@ -352,7 +352,7 @@ MODULE_DEVICE_TABLE(i2c, max77686_i2c_id);
> #ifdef CONFIG_PM_SLEEP
> static int max77686_suspend(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max77686_dev *max77686 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> @@ -374,7 +374,7 @@ static int max77686_suspend(struct device *dev)
>
> static int max77686_resume(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max77686_dev *max77686 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c
> index 007f729..b83b7a7 100644
> --- a/drivers/mfd/max77693.c
> +++ b/drivers/mfd/max77693.c
> @@ -334,7 +334,7 @@ MODULE_DEVICE_TABLE(i2c, max77693_i2c_id);
>
> static int max77693_suspend(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev)) {
> @@ -347,7 +347,7 @@ static int max77693_suspend(struct device *dev)
>
> static int max77693_resume(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev)) {
> diff --git a/drivers/mfd/max77843.c b/drivers/mfd/max77843.c
> index 586098f..7cfc95b 100644
> --- a/drivers/mfd/max77843.c
> +++ b/drivers/mfd/max77843.c
> @@ -197,7 +197,7 @@ MODULE_DEVICE_TABLE(i2c, max77843_id);
>
> static int __maybe_unused max77843_suspend(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max77693_dev *max77843 = i2c_get_clientdata(i2c);
>
> disable_irq(max77843->irq);
> @@ -209,7 +209,7 @@ static int __maybe_unused max77843_suspend(struct device *dev)
>
> static int __maybe_unused max77843_resume(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max77693_dev *max77843 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c
> index b0fe810..70443b1 100644
> --- a/drivers/mfd/max8925-i2c.c
> +++ b/drivers/mfd/max8925-i2c.c
> @@ -215,7 +215,7 @@ static int max8925_remove(struct i2c_client *client)
> #ifdef CONFIG_PM_SLEEP
> static int max8925_suspend(struct device *dev)
> {
> - struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *client = to_i2c_client(dev);
> struct max8925_chip *chip = i2c_get_clientdata(client);
>
> if (device_may_wakeup(dev) && chip->wakeup_flag)
> @@ -225,7 +225,7 @@ static int max8925_suspend(struct device *dev)
>
> static int max8925_resume(struct device *dev)
> {
> - struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *client = to_i2c_client(dev);
> struct max8925_chip *chip = i2c_get_clientdata(client);
>
> if (device_may_wakeup(dev) && chip->wakeup_flag)
> diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
> index 156ed6f..f316348 100644
> --- a/drivers/mfd/max8997.c
> +++ b/drivers/mfd/max8997.c
> @@ -437,7 +437,7 @@ static u8 max8997_dumpaddr_haptic[] = {
>
> static int max8997_freeze(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max8997_dev *max8997 = i2c_get_clientdata(i2c);
> int i;
>
> @@ -459,7 +459,7 @@ static int max8997_freeze(struct device *dev)
>
> static int max8997_restore(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max8997_dev *max8997 = i2c_get_clientdata(i2c);
> int i;
>
> @@ -481,7 +481,7 @@ static int max8997_restore(struct device *dev)
>
> static int max8997_suspend(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max8997_dev *max8997 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> @@ -491,7 +491,7 @@ static int max8997_suspend(struct device *dev)
>
> static int max8997_resume(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max8997_dev *max8997 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c
> index a7afe3b..ab28b29 100644
> --- a/drivers/mfd/max8998.c
> +++ b/drivers/mfd/max8998.c
> @@ -274,7 +274,7 @@ MODULE_DEVICE_TABLE(i2c, max8998_i2c_id);
>
> static int max8998_suspend(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max8998_dev *max8998 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> @@ -284,7 +284,7 @@ static int max8998_suspend(struct device *dev)
>
> static int max8998_resume(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct max8998_dev *max8998 = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> @@ -344,7 +344,7 @@ static struct max8998_reg_dump max8998_dump[] = {
> /* Save registers before hibernation */
> static int max8998_freeze(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> int i;
>
> for (i = 0; i < ARRAY_SIZE(max8998_dump); i++)
> @@ -357,7 +357,7 @@ static int max8998_freeze(struct device *dev)
> /* Restore registers after hibernation */
> static int max8998_restore(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> int i;
>
> for (i = 0; i < ARRAY_SIZE(max8998_dump); i++)
> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> index c9802ba..400e1d7 100644
> --- a/drivers/mfd/sec-core.c
> +++ b/drivers/mfd/sec-core.c
> @@ -536,7 +536,7 @@ static void sec_pmic_shutdown(struct i2c_client *i2c)
> #ifdef CONFIG_PM_SLEEP
> static int sec_pmic_suspend(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct sec_pmic_dev *sec_pmic = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
> @@ -557,7 +557,7 @@ static int sec_pmic_suspend(struct device *dev)
>
> static int sec_pmic_resume(struct device *dev)
> {
> - struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
> + struct i2c_client *i2c = to_i2c_client(dev);
> struct sec_pmic_dev *sec_pmic = i2c_get_clientdata(i2c);
>
> if (device_may_wakeup(dev))
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-01-11 8:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-28 15:00 [PATCH 1/3] mfd: use to_i2c_client Geliang Tang
2015-12-28 15:00 ` [PATCH 2/3] extcon: rt8973a, sm5502: " Geliang Tang
2015-12-29 0:27 ` Chanwoo Choi
2015-12-28 15:00 ` [PATCH 3/3] misc: apds990x, bh1770glc, lis3lv02d: " Geliang Tang
2015-12-28 23:56 ` [PATCH 1/3] mfd: " Krzysztof Kozlowski
2015-12-29 0:29 ` Chanwoo Choi
2016-01-11 8:00 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).