Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1558407 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2017-01-13 14:40 +0100 |
| Last post | 2017-01-16 07:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 1/4] mfd: max77686: Don't attempt to get i2c_device_id .data Javier Martinez Canillas <javier@osg.samsung.com> - 2017-01-13 14:40 +0100
Re: [PATCH v2 1/4] mfd: max77686: Don't attempt to get i2c_device_id .data Chanwoo Choi <cw00.choi@samsung.com> - 2017-01-16 07:40 +0100
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2017-01-13 14:40 +0100 |
| Subject | [PATCH v2 1/4] mfd: max77686: Don't attempt to get i2c_device_id .data |
| Message-ID | <sZaff-1qE-5@gated-at.bofh.it> |
The driver is only used in platforms that have DT support so always the
I2C device .data will be get from the matched OF node and never will be
from the I2C device ID table.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Changes in v2:
- Add Laxman's Acked-by tag to patch 1/4.
- Add Krzysztof's Reviewed-by and Tested-by tags to patch 1/4.
drivers/mfd/max77686.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c
index 7b68ed72e9cb..ddae3bf3e46c 100644
--- a/drivers/mfd/max77686.c
+++ b/drivers/mfd/max77686.c
@@ -188,14 +188,11 @@ static int max77686_i2c_probe(struct i2c_client *i2c,
if (!max77686)
return -ENOMEM;
- if (i2c->dev.of_node) {
- match = of_match_node(max77686_pmic_dt_match, i2c->dev.of_node);
- if (!match)
- return -EINVAL;
-
- max77686->type = (unsigned long)match->data;
- } else
- max77686->type = id->driver_data;
+ match = of_match_node(max77686_pmic_dt_match, i2c->dev.of_node);
+ if (!match)
+ return -EINVAL;
+
+ max77686->type = (unsigned long)match->data;
i2c_set_clientdata(i2c, max77686);
max77686->dev = &i2c->dev;
--
2.7.4
[toc] | [next] | [standalone]
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2017-01-16 07:40 +0100 |
| Subject | Re: [PATCH v2 1/4] mfd: max77686: Don't attempt to get i2c_device_id .data |
| Message-ID | <t097r-4PF-17@gated-at.bofh.it> |
| In reply to | #1558407 |
Hi,
On 2017년 01월 13일 22:34, Javier Martinez Canillas wrote:
> The driver is only used in platforms that have DT support so always the
> I2C device .data will be get from the matched OF node and never will be
> from the I2C device ID table.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> ---
>
> Changes in v2:
> - Add Laxman's Acked-by tag to patch 1/4.
> - Add Krzysztof's Reviewed-by and Tested-by tags to patch 1/4.
>
> drivers/mfd/max77686.c | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c
> index 7b68ed72e9cb..ddae3bf3e46c 100644
> --- a/drivers/mfd/max77686.c
> +++ b/drivers/mfd/max77686.c
> @@ -188,14 +188,11 @@ static int max77686_i2c_probe(struct i2c_client *i2c,
> if (!max77686)
> return -ENOMEM;
>
> - if (i2c->dev.of_node) {
> - match = of_match_node(max77686_pmic_dt_match, i2c->dev.of_node);
> - if (!match)
> - return -EINVAL;
> -
> - max77686->type = (unsigned long)match->data;
> - } else
> - max77686->type = id->driver_data;
> + match = of_match_node(max77686_pmic_dt_match, i2c->dev.of_node);
> + if (!match)
> + return -EINVAL;
> +
> + max77686->type = (unsigned long)match->data;
>
> i2c_set_clientdata(i2c, max77686);
> max77686->dev = &i2c->dev;
>
Looks good to me.
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
--
Best Regards,
Chanwoo Choi
S/W Center, Samsung Electronics
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web