From 0398e112f2f1dc293183f6e6720985b1d861ea39 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 28 Sep 2023 12:09:27 +0200 Subject: [PATCH] ipu6: Fix sensor driver compilation with kernels >= 6.6.0 Kernel 6.6.0 has dropped the probe_new i2c_driver callback, all drivers must now use the probe callback which now uses the same func-prototype as probe_new used to. Signed-off-by: Hans de Goede --- drivers/media/i2c/gc5035.c | 4 ++++ drivers/media/i2c/hi556.c | 4 ++++ drivers/media/i2c/hm11b1.c | 4 ++++ drivers/media/i2c/hm2170.c | 4 ++++ drivers/media/i2c/hm2172.c | 4 ++++ drivers/media/i2c/ov01a10.c | 4 ++++ drivers/media/i2c/ov01a1s.c | 4 ++++ drivers/media/i2c/ov02c10.c | 4 ++++ drivers/media/i2c/ov08a10.c | 4 ++++ drivers/media/i2c/ov2740.c | 4 ++++ drivers/media/i2c/ov8856.c | 4 ++++ 11 files changed, 44 insertions(+) diff --git a/drivers/media/i2c/gc5035.c b/drivers/media/i2c/gc5035.c index b46fd5474b2a..25f08ccf43da 100644 --- a/drivers/media/i2c/gc5035.c +++ b/drivers/media/i2c/gc5035.c @@ -2188,7 +2188,11 @@ static struct i2c_driver gc5035_i2c_driver = { .acpi_match_table = ACPI_PTR(gc5035_acpi_ids), .of_match_table = gc5035_of_match, }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = gc5035_probe, +#else + .probe = gc5035_probe, +#endif .remove = gc5035_remove, }; module_i2c_driver(gc5035_i2c_driver); diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c index 619125302d39..35056a292c48 100644 --- a/drivers/media/i2c/hi556.c +++ b/drivers/media/i2c/hi556.c @@ -1340,7 +1340,11 @@ static struct i2c_driver hi556_i2c_driver = { .pm = &hi556_pm_ops, .acpi_match_table = ACPI_PTR(hi556_acpi_ids), }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = hi556_probe, +#else + .probe = hi556_probe, +#endif .remove = hi556_remove, #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) .flags = I2C_DRV_ACPI_WAIVE_D0_PROBE, diff --git a/drivers/media/i2c/hm11b1.c b/drivers/media/i2c/hm11b1.c index 39f60a7ab073..fa9da1b58b11 100644 --- a/drivers/media/i2c/hm11b1.c +++ b/drivers/media/i2c/hm11b1.c @@ -1229,7 +1229,11 @@ static struct i2c_driver hm11b1_i2c_driver = { .pm = &hm11b1_pm_ops, .acpi_match_table = ACPI_PTR(hm11b1_acpi_ids), }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = hm11b1_probe, +#else + .probe = hm11b1_probe, +#endif .remove = hm11b1_remove, }; diff --git a/drivers/media/i2c/hm2170.c b/drivers/media/i2c/hm2170.c index d48329f2fc70..74638557f7da 100644 --- a/drivers/media/i2c/hm2170.c +++ b/drivers/media/i2c/hm2170.c @@ -1324,7 +1324,11 @@ static struct i2c_driver hm2170_i2c_driver = { .pm = &hm2170_pm_ops, .acpi_match_table = hm2170_acpi_ids, }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = hm2170_probe, +#else + .probe = hm2170_probe, +#endif .remove = hm2170_remove, }; diff --git a/drivers/media/i2c/hm2172.c b/drivers/media/i2c/hm2172.c index 52d7274c7710..0c54793f6c96 100644 --- a/drivers/media/i2c/hm2172.c +++ b/drivers/media/i2c/hm2172.c @@ -1620,7 +1620,11 @@ static struct i2c_driver hm2172_i2c_driver = { .pm = &hm2172_pm_ops, .acpi_match_table = hm2172_acpi_ids, }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = hm2172_probe, +#else + .probe = hm2172_probe, +#endif .remove = hm2172_remove, }; diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c index d243db180d99..ae8024e88344 100644 --- a/drivers/media/i2c/ov01a10.c +++ b/drivers/media/i2c/ov01a10.c @@ -1025,7 +1025,11 @@ static struct i2c_driver ov01a10_i2c_driver = { .pm = &ov01a10_pm_ops, .acpi_match_table = ACPI_PTR(ov01a10_acpi_ids), }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = ov01a10_probe, +#else + .probe = ov01a10_probe, +#endif .remove = ov01a10_remove, }; diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c index 50618d07b1a4..0dcce8b492b4 100644 --- a/drivers/media/i2c/ov01a1s.c +++ b/drivers/media/i2c/ov01a1s.c @@ -1172,7 +1172,11 @@ static struct i2c_driver ov01a1s_i2c_driver = { .pm = &ov01a1s_pm_ops, .acpi_match_table = ACPI_PTR(ov01a1s_acpi_ids), }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = ov01a1s_probe, +#else + .probe = ov01a1s_probe, +#endif .remove = ov01a1s_remove, }; diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c index aa6f48bcb2fd..0c160a6dc8bc 100644 --- a/drivers/media/i2c/ov02c10.c +++ b/drivers/media/i2c/ov02c10.c @@ -1521,7 +1521,11 @@ static struct i2c_driver ov02c10_i2c_driver = { .pm = &ov02c10_pm_ops, .acpi_match_table = ACPI_PTR(ov02c10_acpi_ids), }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = ov02c10_probe, +#else + .probe = ov02c10_probe, +#endif .remove = ov02c10_remove, }; diff --git a/drivers/media/i2c/ov08a10.c b/drivers/media/i2c/ov08a10.c index 3ae4662dc1b5..d47473528ad0 100644 --- a/drivers/media/i2c/ov08a10.c +++ b/drivers/media/i2c/ov08a10.c @@ -1131,7 +1131,11 @@ static struct i2c_driver ov08a10_i2c_driver = { .pm = &ov08a10_pm_ops, .acpi_match_table = ov08a10_acpi_ids, }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = ov08a10_probe, +#else + .probe = ov08a10_probe, +#endif .remove = ov08a10_remove, }; diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c index 1b26535ad3a3..0b16d5a360d4 100644 --- a/drivers/media/i2c/ov2740.c +++ b/drivers/media/i2c/ov2740.c @@ -1627,7 +1627,11 @@ static struct i2c_driver ov2740_i2c_driver = { .pm = &ov2740_pm_ops, .acpi_match_table = ov2740_acpi_ids, }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = ov2740_probe, +#else + .probe = ov2740_probe, +#endif .remove = ov2740_remove, }; diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c index 07b4d16e7cc7..b1e938e678c7 100644 --- a/drivers/media/i2c/ov8856.c +++ b/drivers/media/i2c/ov8856.c @@ -1308,7 +1308,11 @@ static struct i2c_driver ov8856_i2c_driver = { .pm = &ov8856_pm_ops, .acpi_match_table = ACPI_PTR(ov8856_acpi_ids), }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) .probe_new = ov8856_probe, +#else + .probe = ov8856_probe, +#endif .remove = ov8856_remove, .id_table = ov8856_id_table, };