mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
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/ -03c835f498
-b8a1a4cd5a
This commit is contained in:
parent
b1958e9733
commit
4d91c61f93
@ -43,7 +43,7 @@ Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
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 <jernej.skrabec@siol.net>
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+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 <jernej.skrabec@siol.net>
|
||||
+ .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,
|
||||
+};
|
||||
|
Loading…
x
Reference in New Issue
Block a user