[288/606] leds: turris-omnia: Convert to i2c's .probe_new()

Message ID 20221118224540.619276-289-uwe@kleine-koenig.org
State New
Headers
Series i2c: Complete conversion to i2c_probe_new |

Commit Message

Uwe Kleine-König Nov. 18, 2022, 10:40 p.m. UTC
  From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/leds/leds-turris-omnia.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
  

Comments

Marek Behún Nov. 20, 2022, 12:49 p.m. UTC | #1
On Fri, 18 Nov 2022 23:40:22 +0100
Uwe Kleine-König <uwe@kleine-koenig.org> wrote:

> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> The probe function doesn't make use of the i2c_device_id * parameter so it
> can be trivially converted.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Marek Behún <kabel@kernel.org>
  
Uwe Kleine-König Dec. 2, 2022, 11:12 a.m. UTC | #2
Hello Pavel,

On Fri, Nov 18, 2022 at 11:40:22PM +0100, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> The probe function doesn't make use of the i2c_device_id * parameter so it
> can be trivially converted.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

I didn't get any feedback from your side about this patch set.

In case the problem is "only" to get the led patches out of this
series, I recommend:

	b4 am -l -s -P268-288 20221118224540.619276-1-uwe@kleine-koenig.org

Best regards
Uwe
  
Pavel Machek Dec. 7, 2022, 8:30 p.m. UTC | #3
Hi!

> On Fri, Nov 18, 2022 at 11:40:22PM +0100, Uwe Kleine-König wrote:
> > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > The probe function doesn't make use of the i2c_device_id * parameter so it
> > can be trivially converted.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> I didn't get any feedback from your side about this patch set.
> 
> In case the problem is "only" to get the led patches out of this
> series, I recommend:
> 
> 	b4 am -l -s -P268-288 20221118224540.619276-1-uwe@kleine-koenig.org

Yeah, well, I guess:

# A part of the patches depend on commit 662233731d66 ("i2c: core:
# Introduce i2c_client_get_device_id helper function"), there is a branch that
# you can pull into your tree to get it:

this is a bit of a problem because Linus will be unhappy if I pull
into my for-next branch.

So... I can get them in the next cycle, or I can ack them and get them
via some special arangement with linux, or...

Best regards,
								Pavel
  
Uwe Kleine-König Dec. 8, 2022, 7:51 a.m. UTC | #4
Hello Pavel,

On Wed, Dec 07, 2022 at 09:30:27PM +0100, Pavel Machek wrote:
> > On Fri, Nov 18, 2022 at 11:40:22PM +0100, Uwe Kleine-König wrote:
> > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > 
> > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > can be trivially converted.
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > I didn't get any feedback from your side about this patch set.
> > 
> > In case the problem is "only" to get the led patches out of this
> > series, I recommend:
> > 
> > 	b4 am -l -s -P268-288 20221118224540.619276-1-uwe@kleine-koenig.org
> 
> Yeah, well, I guess:
> 
> # A part of the patches depend on commit 662233731d66 ("i2c: core:
> # Introduce i2c_client_get_device_id helper function"), there is a branch that
> # you can pull into your tree to get it:
> 
> this is a bit of a problem because Linus will be unhappy if I pull
> into my for-next branch.

I wonder if it's you or me who has a wrong expectation about Linus here.
IIUC he is unhappy if you pull some random tree (e.g. his own) for no
better reason than to update, but an immutable tag/branch to get a
dependency right should be fine. That's the whole idea about immutable
tags and branches, isn't it?

Looking at today's next, there are several merges of this immutable branch:

 - 3d94887aca09 ("Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into next")
   by Dmitry Torokhov for branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
 - 719c547c6551 ("Merge branch 'i2c/client_device_id_helper-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux")
   by Herbert Xu for branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
 - 963c7fe6cdbf ("Merge branch i2c/client_device_id_helper-immutable of wsa/linux into next")
   by Michael Ellerman for branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
 - 06fa87fc9311 ("Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into gpio/for-next")
   by Bartosz Golaszewski for branch 'gpio/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
 - 2f88b7050d67 ("Merge 'i2c/client_device_id_helper-immutable'")
   by Sebastian Reichel for branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git
 - b15654dd11e6 ("Merge remote-tracking branch 'i2c/i2c/client_device_id_helper-immutable' into togreg")
   by Jonathan Cameron for branch 'char-misc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
 - 149f52664bb3 ("Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into regulator-6.2")
   by Mark Brown for branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
 - e0c7800a5530 ("Merge branch 'i2c/client_device_id_helper-immutable' into i2c/for-mergewindow")
   by Wolfram Sang for branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
 - 4cb55a9a1ab7 ("Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into HEAD")
   by Mark Brown for branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
 - c43c0e589e69 ("Merge branch 'i2c/client_device_id_helper-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux")
   by Jakub Kicinski for branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
 - 41948bd9cf01 ("Merge branch 'i2c/client_device_id_helper-immutable' of https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into spi-6.2")
   by Mark Brown for branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git

mfd and backlight just started stacking on top of 662233731d66cf41e7494e532e702849c8ce18f3.

So you should be in good company at least if Linus gets angry :-)

Best regards
Uwe
  
Uwe Kleine-König Dec. 22, 2022, 9:42 p.m. UTC | #5
Hello Pavel,

On Fri, Dec 02, 2022 at 12:12:21PM +0100, Uwe Kleine-König wrote:
> On Fri, Nov 18, 2022 at 11:40:22PM +0100, Uwe Kleine-König wrote:
> > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > The probe function doesn't make use of the i2c_device_id * parameter so it
> > can be trivially converted.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> I didn't get any feedback from your side about this patch set.
> 
> In case the problem is "only" to get the led patches out of this
> series, I recommend:
> 
> 	b4 am -l -s -P268-288 20221118224540.619276-1-uwe@kleine-koenig.org

Still no feedback. A big part of the series was applied to the various
trees, but the led patches are not. :-\ Would be great if you queued
them for next after the merge window closed. (Or if you have concerns,
speak up.)

Best regards
Uwe
  
Lee Jones Dec. 23, 2022, 11:25 a.m. UTC | #6
On Thu, 22 Dec 2022, Uwe Kleine-König wrote:

> Hello Pavel,
> 
> On Fri, Dec 02, 2022 at 12:12:21PM +0100, Uwe Kleine-König wrote:
> > On Fri, Nov 18, 2022 at 11:40:22PM +0100, Uwe Kleine-König wrote:
> > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > 
> > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > can be trivially converted.
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > I didn't get any feedback from your side about this patch set.
> > 
> > In case the problem is "only" to get the led patches out of this
> > series, I recommend:
> > 
> > 	b4 am -l -s -P268-288 20221118224540.619276-1-uwe@kleine-koenig.org
> 
> Still no feedback. A big part of the series was applied to the various
> trees, but the led patches are not. :-\ Would be great if you queued
> them for next after the merge window closed. (Or if you have concerns,
> speak up.)

If it's okay with Pavel, I can pick these up after the holidays.
  
Lee Jones Jan. 5, 2023, 2:47 p.m. UTC | #7
On Fri, 23 Dec 2022, Lee Jones wrote:

> On Thu, 22 Dec 2022, Uwe Kleine-König wrote:
> 
> > Hello Pavel,
> > 
> > On Fri, Dec 02, 2022 at 12:12:21PM +0100, Uwe Kleine-König wrote:
> > > On Fri, Nov 18, 2022 at 11:40:22PM +0100, Uwe Kleine-König wrote:
> > > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > 
> > > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > > can be trivially converted.
> > > > 
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > 
> > > I didn't get any feedback from your side about this patch set.
> > > 
> > > In case the problem is "only" to get the led patches out of this
> > > series, I recommend:
> > > 
> > > 	b4 am -l -s -P268-288 20221118224540.619276-1-uwe@kleine-koenig.org
> > 
> > Still no feedback. A big part of the series was applied to the various
> > trees, but the led patches are not. :-\ Would be great if you queued
> > them for next after the merge window closed. (Or if you have concerns,
> > speak up.)
> 
> If it's okay with Pavel, I can pick these up after the holidays.

Applied now, thanks.
  

Patch

diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
index c7c9851c894a..013f551b32b2 100644
--- a/drivers/leds/leds-turris-omnia.c
+++ b/drivers/leds/leds-turris-omnia.c
@@ -201,8 +201,7 @@  static struct attribute *omnia_led_controller_attrs[] = {
 };
 ATTRIBUTE_GROUPS(omnia_led_controller);
 
-static int omnia_leds_probe(struct i2c_client *client,
-			    const struct i2c_device_id *id)
+static int omnia_leds_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct device_node *np = dev_of_node(dev), *child;
@@ -272,7 +271,7 @@  static const struct i2c_device_id omnia_id[] = {
 MODULE_DEVICE_TABLE(i2c, omnia_id);
 
 static struct i2c_driver omnia_leds_driver = {
-	.probe		= omnia_leds_probe,
+	.probe_new	= omnia_leds_probe,
 	.remove		= omnia_leds_remove,
 	.id_table	= omnia_id,
 	.driver		= {