From 4d91c61f930ce53df43fb048c85835f256e088c7 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Tue, 21 Mar 2023 13:17:30 +0000 Subject: [PATCH] linux (Allwinner): i2c: move to .probe_new() call-back type since kernel 4.10-rc1 .probe_new has been availble as a prototype. from kernel 6.3-rc2 the old prototype which included a i2c_device_id variable has now dropped this variable. update the AC200 patch to use .probe_new which will allow this patch to compile against kernels >= 4.10 in future - the patch can be updated to use .probe (but will loose compatibilty with kernels <= 6.3.) ref: - https://lore.kernel.org/lkml/1477413715-22894-7-git-send-email-kieran@bingham.xyz/ - https://github.com/torvalds/linux/commit/03c835f498b540087244a6757e87dfe7ef10999b - https://github.com/torvalds/linux/commit/b8a1a4cd5a98a2adf8dfd6902cd98e57d910ee12 --- .../patches/linux/0028-mfd-Add-support-for-AC200.patch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/Allwinner/patches/linux/0028-mfd-Add-support-for-AC200.patch b/projects/Allwinner/patches/linux/0028-mfd-Add-support-for-AC200.patch index 53b7895ed8..e3c5815c22 100644 --- a/projects/Allwinner/patches/linux/0028-mfd-Add-support-for-AC200.patch +++ b/projects/Allwinner/patches/linux/0028-mfd-Add-support-for-AC200.patch @@ -43,7 +43,7 @@ Signed-off-by: Jernej Skrabec obj-$(CONFIG_MFD_AXP20X_RSB) += axp20x-rsb.o --- /dev/null +++ b/drivers/mfd/ac200.c -@@ -0,0 +1,148 @@ +@@ -0,0 +1,147 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * MFD core driver for X-Powers' AC200 IC @@ -104,8 +104,7 @@ Signed-off-by: Jernej Skrabec + }, +}; + -+static int ac200_i2c_probe(struct i2c_client *i2c, -+ const struct i2c_device_id *id) ++static int ac200_i2c_probe(struct i2c_client *i2c) +{ + struct device *dev = &i2c->dev; + struct ac200_dev *ac200; @@ -183,7 +182,7 @@ Signed-off-by: Jernej Skrabec + .name = "ac200", + .of_match_table = of_match_ptr(ac200_of_match), + }, -+ .probe = ac200_i2c_probe, ++ .probe_new = ac200_i2c_probe, + .remove = ac200_i2c_remove, + .id_table = ac200_ids, +};