* [PATCH] mfd: mc13xxx: Simplify probe()
@ 2023-08-19 18:31 Biju Das
2023-08-21 12:06 ` (subset) " Lee Jones
2023-08-21 12:07 ` Lee Jones
0 siblings, 2 replies; 4+ messages in thread
From: Biju Das @ 2023-08-19 18:31 UTC (permalink / raw)
To: Lee Jones
Cc: Biju Das, Geert Uytterhoeven, Prabhakar Mahadev Lad,
linux-renesas-soc
Simplify probe() by replacing of_match_device() and ID lookup
for retrieving match data by i2c_get_match_data().
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
Note:
* This patch is only compile tested.
---
drivers/mfd/mc13xxx-i2c.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/mfd/mc13xxx-i2c.c b/drivers/mfd/mc13xxx-i2c.c
index de59b498c925..6bc0e755ba34 100644
--- a/drivers/mfd/mc13xxx-i2c.c
+++ b/drivers/mfd/mc13xxx-i2c.c
@@ -53,7 +53,6 @@ static const struct regmap_config mc13xxx_regmap_i2c_config = {
static int mc13xxx_i2c_probe(struct i2c_client *client)
{
- const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct mc13xxx *mc13xxx;
int ret;
@@ -73,13 +72,7 @@ static int mc13xxx_i2c_probe(struct i2c_client *client)
return ret;
}
- if (client->dev.of_node) {
- const struct of_device_id *of_id =
- of_match_device(mc13xxx_dt_ids, &client->dev);
- mc13xxx->variant = of_id->data;
- } else {
- mc13xxx->variant = (void *)id->driver_data;
- }
+ mc13xxx->variant = i2c_get_match_data(client);
return mc13xxx_common_init(&client->dev);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: (subset) [PATCH] mfd: mc13xxx: Simplify probe()
2023-08-19 18:31 [PATCH] mfd: mc13xxx: Simplify probe() Biju Das
@ 2023-08-21 12:06 ` Lee Jones
2023-08-21 12:07 ` Lee Jones
1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2023-08-21 12:06 UTC (permalink / raw)
To: Lee Jones, Biju Das
Cc: Geert Uytterhoeven, Prabhakar Mahadev Lad, linux-renesas-soc
On Sat, 19 Aug 2023 19:31:55 +0100, Biju Das wrote:
> Simplify probe() by replacing of_match_device() and ID lookup
> for retrieving match data by i2c_get_match_data().
>
>
Applied, thanks!
[1/1] mfd: mc13xxx: Simplify probe()
commit: 2c1375064ea6e62d529e9d545292537a0b21dbdf
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mfd: mc13xxx: Simplify probe()
2023-08-19 18:31 [PATCH] mfd: mc13xxx: Simplify probe() Biju Das
2023-08-21 12:06 ` (subset) " Lee Jones
@ 2023-08-21 12:07 ` Lee Jones
2023-08-21 12:15 ` Biju Das
1 sibling, 1 reply; 4+ messages in thread
From: Lee Jones @ 2023-08-21 12:07 UTC (permalink / raw)
To: Biju Das; +Cc: Geert Uytterhoeven, Prabhakar Mahadev Lad, linux-renesas-soc
On Sat, 19 Aug 2023, Biju Das wrote:
> Simplify probe() by replacing of_match_device() and ID lookup
> for retrieving match data by i2c_get_match_data().
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> Note:
> * This patch is only compile tested.
> ---
> drivers/mfd/mc13xxx-i2c.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
I improved the inadequate subject line before applying.
Please ensure subject lines are both succinct and forthcoming.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] mfd: mc13xxx: Simplify probe()
2023-08-21 12:07 ` Lee Jones
@ 2023-08-21 12:15 ` Biju Das
0 siblings, 0 replies; 4+ messages in thread
From: Biju Das @ 2023-08-21 12:15 UTC (permalink / raw)
To: Lee Jones
Cc: Geert Uytterhoeven, Prabhakar Mahadev Lad,
linux-renesas-soc@vger.kernel.org
Hi Lee Jones,
Thanks for the feedback.
> Subject: Re: [PATCH] mfd: mc13xxx: Simplify probe()
>
> On Sat, 19 Aug 2023, Biju Das wrote:
>
> > Simplify probe() by replacing of_match_device() and ID lookup for
> > retrieving match data by i2c_get_match_data().
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > Note:
> > * This patch is only compile tested.
> > ---
> > drivers/mfd/mc13xxx-i2c.c | 9 +--------
> > 1 file changed, 1 insertion(+), 8 deletions(-)
>
> I improved the inadequate subject line before applying.
>
> Please ensure subject lines are both succinct and forthcoming.
My bad, will take care next time.
Cheers,
Biju
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-21 12:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-19 18:31 [PATCH] mfd: mc13xxx: Simplify probe() Biju Das
2023-08-21 12:06 ` (subset) " Lee Jones
2023-08-21 12:07 ` Lee Jones
2023-08-21 12:15 ` Biju Das
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.