diff options
author | André Draszik <draszik@google.com> | 2023-04-07 11:17:47 +0100 |
---|---|---|
committer | Will McVicker <willmcvicker@google.com> | 2023-05-03 15:39:25 -0700 |
commit | 9f6e8a857decf5007758e01c4b5ea7f6cd5e39ff (patch) | |
tree | dde679e79399f5cbe73758a0dfcf51ffea4e3477 | |
parent | f2fa537c1f0f50ef31a3d336315619024139306d (diff) | |
download | sec_touch-9f6e8a857decf5007758e01c4b5ea7f6cd5e39ff.tar.gz |
i2c: convert to struct i2c_driver::probe_new() (prepare for v6.3 kernel)
Upstream kernel commit [1] has switched probe() to the same
signature as probe_new(), which breaks compilation for the
drivers here:
.../common/../private/google-modules/amplifiers/drv2624/drv2624.c:1903:11: error: incompatible function pointer types initializing 'int (*)(struct i2c_client *)' with an expression of type 'int (struct i2c_client *, const struct i2c_device_id *)' [-Wincompatible-function-pointer-types]
.probe = drv2624_i2c_probe,
^~~~~~~~~~~~~~~~~
1 error generated.
The probe function doesn't make use of the i2c_device_id * parameter so
it can be trivially converted.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=03c835f498b5
("i2c: Switch .probe() to not take an id parameter")
Bug: 277308451
Test: TH
Change-Id: I8669e9b8a1e1afd7102ae976b342fdc59f4fb78d
Signed-off-by: André Draszik <draszik@google.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
-rw-r--r-- | sec_ts.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -4410,8 +4410,7 @@ static struct notifier_block sec_ts_psy_nb; #endif #ifdef I2C_INTERFACE -static int sec_ts_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int sec_ts_probe(struct i2c_client *client) #else static int sec_ts_probe(struct spi_device *client) #endif @@ -6192,7 +6191,7 @@ static const struct of_device_id sec_ts_match_table[] = { #ifdef I2C_INTERFACE static struct i2c_driver sec_ts_driver = { - .probe = sec_ts_probe, + .probe_new = sec_ts_probe, .remove = sec_ts_remove, .shutdown = sec_ts_shutdown, .id_table = sec_ts_id, |