Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: Switch back to struct platform_driver::remove()

After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/iio/ to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

While touching these files, make indention of the struct initializer
consistent in several files.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20241009060056.502059-2-u.kleine-koenig@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Uwe Kleine-König and committed by
Jonathan Cameron
6a9262ed 92accba9

+57 -57
+1 -1
drivers/iio/accel/hid-sensor-accel-3d.c
··· 451 451 .pm = &hid_sensor_pm_ops, 452 452 }, 453 453 .probe = hid_accel_3d_probe, 454 - .remove_new = hid_accel_3d_remove, 454 + .remove = hid_accel_3d_remove, 455 455 }; 456 456 module_platform_driver(hid_accel_3d_platform_driver); 457 457
+1 -1
drivers/iio/adc/ab8500-gpadc.c
··· 1194 1194 1195 1195 static struct platform_driver ab8500_gpadc_driver = { 1196 1196 .probe = ab8500_gpadc_probe, 1197 - .remove_new = ab8500_gpadc_remove, 1197 + .remove = ab8500_gpadc_remove, 1198 1198 .driver = { 1199 1199 .name = "ab8500-gpadc", 1200 1200 .pm = pm_ptr(&ab8500_gpadc_pm_ops),
+1 -1
drivers/iio/adc/at91-sama5d2_adc.c
··· 2625 2625 2626 2626 static struct platform_driver at91_adc_driver = { 2627 2627 .probe = at91_adc_probe, 2628 - .remove_new = at91_adc_remove, 2628 + .remove = at91_adc_remove, 2629 2629 .driver = { 2630 2630 .name = "at91-sama5d2_adc", 2631 2631 .of_match_table = at91_adc_dt_match,
+1 -1
drivers/iio/adc/at91_adc.c
··· 1341 1341 1342 1342 static struct platform_driver at91_adc_driver = { 1343 1343 .probe = at91_adc_probe, 1344 - .remove_new = at91_adc_remove, 1344 + .remove = at91_adc_remove, 1345 1345 .driver = { 1346 1346 .name = DRIVER_NAME, 1347 1347 .of_match_table = at91_adc_dt_ids,
+1 -1
drivers/iio/adc/axp20x_adc.c
··· 1182 1182 }, 1183 1183 .id_table = axp20x_adc_id_match, 1184 1184 .probe = axp20x_probe, 1185 - .remove_new = axp20x_remove, 1185 + .remove = axp20x_remove, 1186 1186 }; 1187 1187 1188 1188 module_platform_driver(axp20x_adc_driver);
+4 -4
drivers/iio/adc/bcm_iproc_adc.c
··· 611 611 MODULE_DEVICE_TABLE(of, iproc_adc_of_match); 612 612 613 613 static struct platform_driver iproc_adc_driver = { 614 - .probe = iproc_adc_probe, 615 - .remove_new = iproc_adc_remove, 616 - .driver = { 617 - .name = "iproc-static-adc", 614 + .probe = iproc_adc_probe, 615 + .remove = iproc_adc_remove, 616 + .driver = { 617 + .name = "iproc-static-adc", 618 618 .of_match_table = iproc_adc_of_match, 619 619 }, 620 620 };
+1 -1
drivers/iio/adc/dln2-adc.c
··· 700 700 static struct platform_driver dln2_adc_driver = { 701 701 .driver.name = DLN2_ADC_MOD_NAME, 702 702 .probe = dln2_adc_probe, 703 - .remove_new = dln2_adc_remove, 703 + .remove = dln2_adc_remove, 704 704 }; 705 705 706 706 module_platform_driver(dln2_adc_driver);
+1 -1
drivers/iio/adc/ep93xx_adc.c
··· 238 238 .of_match_table = ep93xx_adc_of_ids, 239 239 }, 240 240 .probe = ep93xx_adc_probe, 241 - .remove_new = ep93xx_adc_remove, 241 + .remove = ep93xx_adc_remove, 242 242 }; 243 243 module_platform_driver(ep93xx_adc_driver); 244 244
+1 -1
drivers/iio/adc/exynos_adc.c
··· 1008 1008 1009 1009 static struct platform_driver exynos_adc_driver = { 1010 1010 .probe = exynos_adc_probe, 1011 - .remove_new = exynos_adc_remove, 1011 + .remove = exynos_adc_remove, 1012 1012 .driver = { 1013 1013 .name = "exynos-adc", 1014 1014 .of_match_table = exynos_adc_match,
+1 -1
drivers/iio/adc/imx8qxp-adc.c
··· 487 487 488 488 static struct platform_driver imx8qxp_adc_driver = { 489 489 .probe = imx8qxp_adc_probe, 490 - .remove_new = imx8qxp_adc_remove, 490 + .remove = imx8qxp_adc_remove, 491 491 .driver = { 492 492 .name = ADC_DRIVER_NAME, 493 493 .of_match_table = imx8qxp_adc_match,
+1 -1
drivers/iio/adc/imx93_adc.c
··· 470 470 471 471 static struct platform_driver imx93_adc_driver = { 472 472 .probe = imx93_adc_probe, 473 - .remove_new = imx93_adc_remove, 473 + .remove = imx93_adc_remove, 474 474 .driver = { 475 475 .name = IMX93_ADC_DRIVER_NAME, 476 476 .of_match_table = imx93_adc_match,
+1 -1
drivers/iio/adc/meson_saradc.c
··· 1483 1483 1484 1484 static struct platform_driver meson_sar_adc_driver = { 1485 1485 .probe = meson_sar_adc_probe, 1486 - .remove_new = meson_sar_adc_remove, 1486 + .remove = meson_sar_adc_remove, 1487 1487 .driver = { 1488 1488 .name = "meson-saradc", 1489 1489 .of_match_table = meson_sar_adc_of_match,
+1 -1
drivers/iio/adc/mp2629_adc.c
··· 195 195 .of_match_table = mp2629_adc_of_match, 196 196 }, 197 197 .probe = mp2629_adc_probe, 198 - .remove_new = mp2629_adc_remove, 198 + .remove = mp2629_adc_remove, 199 199 }; 200 200 module_platform_driver(mp2629_adc_driver); 201 201
+3 -3
drivers/iio/adc/mxs-lradc-adc.c
··· 819 819 820 820 static struct platform_driver mxs_lradc_adc_driver = { 821 821 .driver = { 822 - .name = "mxs-lradc-adc", 822 + .name = "mxs-lradc-adc", 823 823 }, 824 - .probe = mxs_lradc_adc_probe, 825 - .remove_new = mxs_lradc_adc_remove, 824 + .probe = mxs_lradc_adc_probe, 825 + .remove = mxs_lradc_adc_remove, 826 826 }; 827 827 module_platform_driver(mxs_lradc_adc_driver); 828 828
+1 -1
drivers/iio/adc/npcm_adc.c
··· 337 337 338 338 static struct platform_driver npcm_adc_driver = { 339 339 .probe = npcm_adc_probe, 340 - .remove_new = npcm_adc_remove, 340 + .remove = npcm_adc_remove, 341 341 .driver = { 342 342 .name = "npcm_adc", 343 343 .of_match_table = npcm_adc_match,
+1 -1
drivers/iio/adc/qcom-pm8xxx-xoadc.c
··· 1014 1014 .of_match_table = pm8xxx_xoadc_id_table, 1015 1015 }, 1016 1016 .probe = pm8xxx_xoadc_probe, 1017 - .remove_new = pm8xxx_xoadc_remove, 1017 + .remove = pm8xxx_xoadc_remove, 1018 1018 }; 1019 1019 module_platform_driver(pm8xxx_xoadc_driver); 1020 1020
+1 -1
drivers/iio/adc/rcar-gyroadc.c
··· 592 592 593 593 static struct platform_driver rcar_gyroadc_driver = { 594 594 .probe = rcar_gyroadc_probe, 595 - .remove_new = rcar_gyroadc_remove, 595 + .remove = rcar_gyroadc_remove, 596 596 .driver = { 597 597 .name = DRIVER_NAME, 598 598 .of_match_table = rcar_gyroadc_match,
+1 -1
drivers/iio/adc/stm32-adc-core.c
··· 906 906 907 907 static struct platform_driver stm32_adc_driver = { 908 908 .probe = stm32_adc_probe, 909 - .remove_new = stm32_adc_remove, 909 + .remove = stm32_adc_remove, 910 910 .driver = { 911 911 .name = "stm32-adc-core", 912 912 .of_match_table = stm32_adc_of_match,
+1 -1
drivers/iio/adc/stm32-adc.c
··· 2644 2644 2645 2645 static struct platform_driver stm32_adc_driver = { 2646 2646 .probe = stm32_adc_probe, 2647 - .remove_new = stm32_adc_remove, 2647 + .remove = stm32_adc_remove, 2648 2648 .driver = { 2649 2649 .name = "stm32-adc", 2650 2650 .of_match_table = stm32_adc_of_match,
+1 -1
drivers/iio/adc/stm32-dfsdm-adc.c
··· 1890 1890 .pm = pm_sleep_ptr(&stm32_dfsdm_adc_pm_ops), 1891 1891 }, 1892 1892 .probe = stm32_dfsdm_adc_probe, 1893 - .remove_new = stm32_dfsdm_adc_remove, 1893 + .remove = stm32_dfsdm_adc_remove, 1894 1894 }; 1895 1895 module_platform_driver(stm32_dfsdm_adc_driver); 1896 1896
+1 -1
drivers/iio/adc/stm32-dfsdm-core.c
··· 506 506 507 507 static struct platform_driver stm32_dfsdm_driver = { 508 508 .probe = stm32_dfsdm_probe, 509 - .remove_new = stm32_dfsdm_core_remove, 509 + .remove = stm32_dfsdm_core_remove, 510 510 .driver = { 511 511 .name = "stm32-dfsdm", 512 512 .of_match_table = stm32_dfsdm_of_match,
+1 -1
drivers/iio/adc/sun4i-gpadc-iio.c
··· 697 697 }, 698 698 .id_table = sun4i_gpadc_id, 699 699 .probe = sun4i_gpadc_probe, 700 - .remove_new = sun4i_gpadc_remove, 700 + .remove = sun4i_gpadc_remove, 701 701 }; 702 702 MODULE_DEVICE_TABLE(of, sun4i_gpadc_of_id); 703 703
+4 -4
drivers/iio/adc/ti_am335x_adc.c
··· 740 740 741 741 static struct platform_driver tiadc_driver = { 742 742 .driver = { 743 - .name = "TI-am335x-adc", 744 - .pm = pm_sleep_ptr(&tiadc_pm_ops), 743 + .name = "TI-am335x-adc", 744 + .pm = pm_sleep_ptr(&tiadc_pm_ops), 745 745 .of_match_table = ti_adc_dt_ids, 746 746 }, 747 - .probe = tiadc_probe, 748 - .remove_new = tiadc_remove, 747 + .probe = tiadc_probe, 748 + .remove = tiadc_remove, 749 749 }; 750 750 module_platform_driver(tiadc_driver); 751 751
+1 -1
drivers/iio/adc/twl4030-madc.c
··· 914 914 915 915 static struct platform_driver twl4030_madc_driver = { 916 916 .probe = twl4030_madc_probe, 917 - .remove_new = twl4030_madc_remove, 917 + .remove = twl4030_madc_remove, 918 918 .driver = { 919 919 .name = "twl4030_madc", 920 920 .of_match_table = twl_madc_of_match,
+1 -1
drivers/iio/adc/twl6030-gpadc.c
··· 1003 1003 1004 1004 static struct platform_driver twl6030_gpadc_driver = { 1005 1005 .probe = twl6030_gpadc_probe, 1006 - .remove_new = twl6030_gpadc_remove, 1006 + .remove = twl6030_gpadc_remove, 1007 1007 .driver = { 1008 1008 .name = DRIVER_NAME, 1009 1009 .pm = pm_sleep_ptr(&twl6030_gpadc_pm_ops),
+1 -1
drivers/iio/adc/vf610_adc.c
··· 972 972 973 973 static struct platform_driver vf610_adc_driver = { 974 974 .probe = vf610_adc_probe, 975 - .remove_new = vf610_adc_remove, 975 + .remove = vf610_adc_remove, 976 976 .driver = { 977 977 .name = DRIVER_NAME, 978 978 .of_match_table = vf610_adc_match,
+1 -1
drivers/iio/dac/dpot-dac.c
··· 243 243 244 244 static struct platform_driver dpot_dac_driver = { 245 245 .probe = dpot_dac_probe, 246 - .remove_new = dpot_dac_remove, 246 + .remove = dpot_dac_remove, 247 247 .driver = { 248 248 .name = "iio-dpot-dac", 249 249 .of_match_table = dpot_dac_match,
+3 -3
drivers/iio/dac/lpc18xx_dac.c
··· 184 184 MODULE_DEVICE_TABLE(of, lpc18xx_dac_match); 185 185 186 186 static struct platform_driver lpc18xx_dac_driver = { 187 - .probe = lpc18xx_dac_probe, 188 - .remove_new = lpc18xx_dac_remove, 189 - .driver = { 187 + .probe = lpc18xx_dac_probe, 188 + .remove = lpc18xx_dac_remove, 189 + .driver = { 190 190 .name = "lpc18xx-dac", 191 191 .of_match_table = lpc18xx_dac_match, 192 192 },
+1 -1
drivers/iio/dac/stm32-dac-core.c
··· 245 245 246 246 static struct platform_driver stm32_dac_driver = { 247 247 .probe = stm32_dac_probe, 248 - .remove_new = stm32_dac_remove, 248 + .remove = stm32_dac_remove, 249 249 .driver = { 250 250 .name = "stm32-dac-core", 251 251 .of_match_table = stm32_dac_of_match,
+1 -1
drivers/iio/dac/stm32-dac.c
··· 398 398 399 399 static struct platform_driver stm32_dac_driver = { 400 400 .probe = stm32_dac_probe, 401 - .remove_new = stm32_dac_remove, 401 + .remove = stm32_dac_remove, 402 402 .driver = { 403 403 .name = "stm32-dac", 404 404 .of_match_table = stm32_dac_of_match,
+1 -1
drivers/iio/dac/vf610_dac.c
··· 272 272 273 273 static struct platform_driver vf610_dac_driver = { 274 274 .probe = vf610_dac_probe, 275 - .remove_new = vf610_dac_remove, 275 + .remove = vf610_dac_remove, 276 276 .driver = { 277 277 .name = "vf610-dac", 278 278 .of_match_table = vf610_dac_match,
+1 -1
drivers/iio/gyro/hid-sensor-gyro-3d.c
··· 386 386 .pm = &hid_sensor_pm_ops, 387 387 }, 388 388 .probe = hid_gyro_3d_probe, 389 - .remove_new = hid_gyro_3d_remove, 389 + .remove = hid_gyro_3d_remove, 390 390 }; 391 391 module_platform_driver(hid_gyro_3d_platform_driver); 392 392
+1 -1
drivers/iio/humidity/hid-sensor-humidity.c
··· 287 287 .pm = &hid_sensor_pm_ops, 288 288 }, 289 289 .probe = hid_humidity_probe, 290 - .remove_new = hid_humidity_remove, 290 + .remove = hid_humidity_remove, 291 291 }; 292 292 module_platform_driver(hid_humidity_platform_driver); 293 293
+1 -1
drivers/iio/light/cm3605.c
··· 318 318 .pm = pm_sleep_ptr(&cm3605_dev_pm_ops), 319 319 }, 320 320 .probe = cm3605_probe, 321 - .remove_new = cm3605_remove, 321 + .remove = cm3605_remove, 322 322 }; 323 323 module_platform_driver(cm3605_driver); 324 324
+1 -1
drivers/iio/light/hid-sensor-als.c
··· 467 467 .pm = &hid_sensor_pm_ops, 468 468 }, 469 469 .probe = hid_als_probe, 470 - .remove_new = hid_als_remove, 470 + .remove = hid_als_remove, 471 471 }; 472 472 module_platform_driver(hid_als_platform_driver); 473 473
+1 -1
drivers/iio/light/hid-sensor-prox.c
··· 344 344 .pm = &hid_sensor_pm_ops, 345 345 }, 346 346 .probe = hid_prox_probe, 347 - .remove_new = hid_prox_remove, 347 + .remove = hid_prox_remove, 348 348 }; 349 349 module_platform_driver(hid_prox_platform_driver); 350 350
+1 -1
drivers/iio/light/lm3533-als.c
··· 912 912 .name = "lm3533-als", 913 913 }, 914 914 .probe = lm3533_als_probe, 915 - .remove_new = lm3533_als_remove, 915 + .remove = lm3533_als_remove, 916 916 }; 917 917 module_platform_driver(lm3533_als_driver); 918 918
+1 -1
drivers/iio/magnetometer/hid-sensor-magn-3d.c
··· 574 574 .pm = &hid_sensor_pm_ops, 575 575 }, 576 576 .probe = hid_magn_3d_probe, 577 - .remove_new = hid_magn_3d_remove, 577 + .remove = hid_magn_3d_remove, 578 578 }; 579 579 module_platform_driver(hid_magn_3d_platform_driver); 580 580
+1 -1
drivers/iio/orientation/hid-sensor-incl-3d.c
··· 410 410 .pm = &hid_sensor_pm_ops, 411 411 }, 412 412 .probe = hid_incl_3d_probe, 413 - .remove_new = hid_incl_3d_remove, 413 + .remove = hid_incl_3d_remove, 414 414 }; 415 415 module_platform_driver(hid_incl_3d_platform_driver); 416 416
+1 -1
drivers/iio/orientation/hid-sensor-rotation.c
··· 362 362 .pm = &hid_sensor_pm_ops, 363 363 }, 364 364 .probe = hid_dev_rot_probe, 365 - .remove_new = hid_dev_rot_remove, 365 + .remove = hid_dev_rot_remove, 366 366 }; 367 367 module_platform_driver(hid_dev_rot_platform_driver); 368 368
+1 -1
drivers/iio/position/hid-sensor-custom-intel-hinge.c
··· 369 369 .pm = &hid_sensor_pm_ops, 370 370 }, 371 371 .probe = hid_hinge_probe, 372 - .remove_new = hid_hinge_remove, 372 + .remove = hid_hinge_remove, 373 373 }; 374 374 module_platform_driver(hid_hinge_platform_driver); 375 375
+1 -1
drivers/iio/pressure/hid-sensor-press.c
··· 350 350 .pm = &hid_sensor_pm_ops, 351 351 }, 352 352 .probe = hid_press_probe, 353 - .remove_new = hid_press_remove, 353 + .remove = hid_press_remove, 354 354 }; 355 355 module_platform_driver(hid_press_platform_driver); 356 356
+1 -1
drivers/iio/proximity/cros_ec_mkbp_proximity.c
··· 261 261 .pm = pm_sleep_ptr(&cros_ec_mkbp_proximity_pm_ops), 262 262 }, 263 263 .probe = cros_ec_mkbp_proximity_probe, 264 - .remove_new = cros_ec_mkbp_proximity_remove, 264 + .remove = cros_ec_mkbp_proximity_remove, 265 265 }; 266 266 module_platform_driver(cros_ec_mkbp_proximity_driver); 267 267
+1 -1
drivers/iio/proximity/srf04.c
··· 389 389 390 390 static struct platform_driver srf04_driver = { 391 391 .probe = srf04_probe, 392 - .remove_new = srf04_remove, 392 + .remove = srf04_remove, 393 393 .driver = { 394 394 .name = "srf04-gpio", 395 395 .of_match_table = of_srf04_match,
+1 -1
drivers/iio/temperature/hid-sensor-temperature.c
··· 283 283 .pm = &hid_sensor_pm_ops, 284 284 }, 285 285 .probe = hid_temperature_probe, 286 - .remove_new = hid_temperature_remove, 286 + .remove = hid_temperature_remove, 287 287 }; 288 288 module_platform_driver(hid_temperature_platform_driver); 289 289
+1 -1
drivers/iio/trigger/iio-trig-interrupt.c
··· 96 96 97 97 static struct platform_driver iio_interrupt_trigger_driver = { 98 98 .probe = iio_interrupt_trigger_probe, 99 - .remove_new = iio_interrupt_trigger_remove, 99 + .remove = iio_interrupt_trigger_remove, 100 100 .driver = { 101 101 .name = "iio_interrupt_trigger", 102 102 },
+1 -1
drivers/iio/trigger/stm32-timer-trigger.c
··· 900 900 901 901 static struct platform_driver stm32_timer_trigger_driver = { 902 902 .probe = stm32_timer_trigger_probe, 903 - .remove_new = stm32_timer_trigger_remove, 903 + .remove = stm32_timer_trigger_remove, 904 904 .driver = { 905 905 .name = "stm32-timer-trigger", 906 906 .of_match_table = stm32_trig_of_match,