Merge tag 'i2c-for-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 Oct 2022 01:54:33 +0000 (18:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 Oct 2022 01:54:33 +0000 (18:54 -0700)
Pull i2c updates from Wolfram Sang:

 - 'remove' callback converted to return void. Big change with trivial
   fixes all over the tree. Other subsystems depending on this change
   have been asked to pull an immutable topic branch for this.

 - new driver for Microchip PCI1xxxx switch

 - heavy refactoring of the Mellanox BlueField driver

 - we prefer async probe in the i801 driver now

 - the rest is usual driver updates (support for more SoCs, some
   refactoring, some feature additions)

* tag 'i2c-for-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (37 commits)
  i2c: pci1xxxx: prevent signed integer overflow
  i2c: acpi: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
  i2c: i801: Prefer async probe
  i2c: designware-pci: Use standard pattern for memory allocation
  i2c: designware-pci: Group AMD NAVI quirk parts together
  i2c: microchip: pci1xxxx: Add driver for I2C host controller in multifunction endpoint of pci1xxxx switch
  docs: i2c: slave-interface: return errno when handle I2C_SLAVE_WRITE_REQUESTED
  i2c: mlxbf: remove device tree support
  i2c: mlxbf: support BlueField-3 SoC
  i2c: cadence: Add standard bus recovery support
  i2c: mlxbf: add multi slave functionality
  i2c: mlxbf: support lock mechanism
  macintosh/ams: Adapt declaration of ams_i2c_remove() to earlier change
  i2c: riic: Use devm_platform_ioremap_resource()
  i2c: mlxbf: remove IRQF_ONESHOT
  dt-bindings: i2c: rockchip: add rockchip,rk3128-i2c
  dt-bindings: i2c: renesas,rcar-i2c: Add r8a779g0 support
  i2c: tegra: Add GPCDMA support
  i2c: scmi: Convert to be a platform driver
  i2c: rk3x: Add rv1126 support
  ...

648 files changed:
Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
Documentation/devicetree/bindings/i2c/i2c-imx.yaml
Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml
Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml [deleted file]
Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml
Documentation/i2c/slave-interface.rst
Documentation/i2c/writing-clients.rst
MAINTAINERS
arch/arm/mach-davinci/board-da850-evm.c
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
drivers/auxdisplay/ht16k33.c
drivers/auxdisplay/lcd2s.c
drivers/char/ipmi/ipmb_dev_int.c
drivers/char/ipmi/ipmi_ipmb.c
drivers/char/ipmi/ipmi_ssif.c
drivers/char/tpm/st33zp24/i2c.c
drivers/char/tpm/tpm_i2c_atmel.c
drivers/char/tpm/tpm_i2c_infineon.c
drivers/char/tpm/tpm_i2c_nuvoton.c
drivers/char/tpm/tpm_tis_i2c.c
drivers/char/tpm/tpm_tis_i2c_cr50.c
drivers/clk/clk-cdce706.c
drivers/clk/clk-cs2000-cp.c
drivers/clk/clk-si514.c
drivers/clk/clk-si5341.c
drivers/clk/clk-si5351.c
drivers/clk/clk-si570.c
drivers/clk/clk-versaclock5.c
drivers/crypto/atmel-ecc.c
drivers/crypto/atmel-sha204a.c
drivers/extcon/extcon-rt8973a.c
drivers/gpio/gpio-adp5588.c
drivers/gpio/gpio-max7300.c
drivers/gpio/gpio-pca953x.c
drivers/gpio/gpio-pcf857x.c
drivers/gpio/gpio-tpic2810.c
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
drivers/gpu/drm/bridge/analogix/anx7625.c
drivers/gpu/drm/bridge/chrontel-ch7033.c
drivers/gpu/drm/bridge/cros-ec-anx7688.c
drivers/gpu/drm/bridge/ite-it6505.c
drivers/gpu/drm/bridge/ite-it66121.c
drivers/gpu/drm/bridge/lontium-lt8912b.c
drivers/gpu/drm/bridge/lontium-lt9211.c
drivers/gpu/drm/bridge/lontium-lt9611.c
drivers/gpu/drm/bridge/lontium-lt9611uxc.c
drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
drivers/gpu/drm/bridge/nxp-ptn3460.c
drivers/gpu/drm/bridge/parade-ps8622.c
drivers/gpu/drm/bridge/sii902x.c
drivers/gpu/drm/bridge/sii9234.c
drivers/gpu/drm/bridge/sil-sii8620.c
drivers/gpu/drm/bridge/tc358767.c
drivers/gpu/drm/bridge/tc358768.c
drivers/gpu/drm/bridge/tc358775.c
drivers/gpu/drm/bridge/ti-dlpc3433.c
drivers/gpu/drm/bridge/ti-sn65dsi83.c
drivers/gpu/drm/bridge/ti-tfp410.c
drivers/gpu/drm/i2c/ch7006_drv.c
drivers/gpu/drm/i2c/sil164_drv.c
drivers/gpu/drm/i2c/tda9950.c
drivers/gpu/drm/i2c/tda998x_drv.c
drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
drivers/gpu/drm/solomon/ssd130x-i2c.c
drivers/hid/i2c-hid/i2c-hid-core.c
drivers/hid/i2c-hid/i2c-hid.h
drivers/hwmon/adc128d818.c
drivers/hwmon/adt7470.c
drivers/hwmon/asb100.c
drivers/hwmon/asc7621.c
drivers/hwmon/dme1737.c
drivers/hwmon/f75375s.c
drivers/hwmon/fschmd.c
drivers/hwmon/ftsteutates.c
drivers/hwmon/ina209.c
drivers/hwmon/ina3221.c
drivers/hwmon/jc42.c
drivers/hwmon/occ/p8_i2c.c
drivers/hwmon/pcf8591.c
drivers/hwmon/smm665.c
drivers/hwmon/tps23861.c
drivers/hwmon/w83781d.c
drivers/hwmon/w83791d.c
drivers/hwmon/w83792d.c
drivers/hwmon/w83793.c
drivers/hwmon/w83795.c
drivers/hwmon/w83l785ts.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/Makefile
drivers/i2c/busses/i2c-cadence.c
drivers/i2c/busses/i2c-designware-amdpsp.c
drivers/i2c/busses/i2c-designware-pcidrv.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-imx-lpi2c.c
drivers/i2c/busses/i2c-ismt.c
drivers/i2c/busses/i2c-mchp-pci1xxxx.c [new file with mode: 0644]
drivers/i2c/busses/i2c-mlxbf.c
drivers/i2c/busses/i2c-riic.c
drivers/i2c/busses/i2c-rk3x.c
drivers/i2c/busses/i2c-scmi.c
drivers/i2c/busses/i2c-tegra.c
drivers/i2c/i2c-core-acpi.c
drivers/i2c/i2c-core-base.c
drivers/i2c/i2c-slave-eeprom.c
drivers/i2c/i2c-slave-testunit.c
drivers/i2c/i2c-smbus.c
drivers/i2c/muxes/Kconfig
drivers/i2c/muxes/i2c-mux-ltc4306.c
drivers/i2c/muxes/i2c-mux-pca9541.c
drivers/i2c/muxes/i2c-mux-pca954x.c
drivers/i2c/muxes/i2c-mux-pinctrl.c
drivers/iio/accel/bma180.c
drivers/iio/accel/bmc150-accel-i2c.c
drivers/iio/accel/kxcjk-1013.c
drivers/iio/accel/kxsd9-i2c.c
drivers/iio/accel/mc3230.c
drivers/iio/accel/mma7455_i2c.c
drivers/iio/accel/mma7660.c
drivers/iio/accel/mma8452.c
drivers/iio/accel/mma9551.c
drivers/iio/accel/mma9553.c
drivers/iio/accel/stk8312.c
drivers/iio/accel/stk8ba50.c
drivers/iio/adc/ad799x.c
drivers/iio/adc/ina2xx-adc.c
drivers/iio/adc/ltc2497.c
drivers/iio/adc/ti-ads1015.c
drivers/iio/chemical/atlas-sensor.c
drivers/iio/chemical/ccs811.c
drivers/iio/chemical/sgp30.c
drivers/iio/dac/ad5380.c
drivers/iio/dac/ad5446.c
drivers/iio/dac/ad5593r.c
drivers/iio/dac/ad5696-i2c.c
drivers/iio/dac/ds4424.c
drivers/iio/dac/m62332.c
drivers/iio/dac/mcp4725.c
drivers/iio/dac/ti-dac5571.c
drivers/iio/gyro/bmg160_i2c.c
drivers/iio/gyro/fxas21002c_i2c.c
drivers/iio/gyro/itg3200_core.c
drivers/iio/gyro/mpu3050-i2c.c
drivers/iio/health/afe4404.c
drivers/iio/health/max30100.c
drivers/iio/health/max30102.c
drivers/iio/humidity/hdc2010.c
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
drivers/iio/imu/kmx61.c
drivers/iio/light/apds9300.c
drivers/iio/light/apds9960.c
drivers/iio/light/bh1750.c
drivers/iio/light/bh1780.c
drivers/iio/light/cm3232.c
drivers/iio/light/cm36651.c
drivers/iio/light/gp2ap002.c
drivers/iio/light/gp2ap020a00f.c
drivers/iio/light/isl29028.c
drivers/iio/light/isl29125.c
drivers/iio/light/jsa1212.c
drivers/iio/light/ltr501.c
drivers/iio/light/opt3001.c
drivers/iio/light/pa12203001.c
drivers/iio/light/rpr0521.c
drivers/iio/light/stk3310.c
drivers/iio/light/tcs3472.c
drivers/iio/light/tsl2563.c
drivers/iio/light/tsl2583.c
drivers/iio/light/tsl4531.c
drivers/iio/light/us5182d.c
drivers/iio/light/vcnl4000.c
drivers/iio/light/vcnl4035.c
drivers/iio/light/veml6070.c
drivers/iio/magnetometer/ak8974.c
drivers/iio/magnetometer/ak8975.c
drivers/iio/magnetometer/bmc150_magn_i2c.c
drivers/iio/magnetometer/hmc5843_i2c.c
drivers/iio/magnetometer/mag3110.c
drivers/iio/magnetometer/yamaha-yas530.c
drivers/iio/potentiostat/lmp91000.c
drivers/iio/pressure/mpl3115.c
drivers/iio/pressure/ms5611_i2c.c
drivers/iio/pressure/zpa2326_i2c.c
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
drivers/iio/proximity/sx9500.c
drivers/iio/temperature/mlx90614.c
drivers/iio/temperature/mlx90632.c
drivers/input/joystick/as5011.c
drivers/input/keyboard/adp5588-keys.c
drivers/input/keyboard/lm8323.c
drivers/input/keyboard/lm8333.c
drivers/input/keyboard/mcs_touchkey.c
drivers/input/keyboard/qt1070.c
drivers/input/keyboard/qt2160.c
drivers/input/keyboard/tca6416-keypad.c
drivers/input/misc/adxl34x-i2c.c
drivers/input/misc/bma150.c
drivers/input/misc/cma3000_d0x_i2c.c
drivers/input/misc/pcf8574_keypad.c
drivers/input/mouse/synaptics_i2c.c
drivers/input/rmi4/rmi_smbus.c
drivers/input/touchscreen/atmel_mxt_ts.c
drivers/input/touchscreen/bu21013_ts.c
drivers/input/touchscreen/cyttsp4_i2c.c
drivers/input/touchscreen/edt-ft5x06.c
drivers/input/touchscreen/goodix.c
drivers/input/touchscreen/migor_ts.c
drivers/input/touchscreen/s6sy761.c
drivers/input/touchscreen/stmfts.c
drivers/input/touchscreen/tsc2004.c
drivers/leds/flash/leds-as3645a.c
drivers/leds/flash/leds-lm3601x.c
drivers/leds/flash/leds-rt4505.c
drivers/leds/leds-an30259a.c
drivers/leds/leds-aw2013.c
drivers/leds/leds-bd2802.c
drivers/leds/leds-blinkm.c
drivers/leds/leds-is31fl32xx.c
drivers/leds/leds-lm3530.c
drivers/leds/leds-lm3532.c
drivers/leds/leds-lm355x.c
drivers/leds/leds-lm3642.c
drivers/leds/leds-lm3692x.c
drivers/leds/leds-lm3697.c
drivers/leds/leds-lp3944.c
drivers/leds/leds-lp3952.c
drivers/leds/leds-lp50xx.c
drivers/leds/leds-lp5521.c
drivers/leds/leds-lp5523.c
drivers/leds/leds-lp5562.c
drivers/leds/leds-lp8501.c
drivers/leds/leds-lp8860.c
drivers/leds/leds-pca9532.c
drivers/leds/leds-tca6507.c
drivers/leds/leds-turris-omnia.c
drivers/macintosh/ams/ams-i2c.c
drivers/macintosh/therm_adt746x.c
drivers/macintosh/therm_windtunnel.c
drivers/macintosh/windfarm_ad7417_sensor.c
drivers/macintosh/windfarm_fcu_controls.c
drivers/macintosh/windfarm_lm75_sensor.c
drivers/macintosh/windfarm_lm87_sensor.c
drivers/macintosh/windfarm_max6690_sensor.c
drivers/macintosh/windfarm_smu_sat.c
drivers/media/cec/i2c/ch7322.c
drivers/media/dvb-frontends/a8293.c
drivers/media/dvb-frontends/af9013.c
drivers/media/dvb-frontends/af9033.c
drivers/media/dvb-frontends/au8522_decoder.c
drivers/media/dvb-frontends/cxd2099.c
drivers/media/dvb-frontends/cxd2820r_core.c
drivers/media/dvb-frontends/dvb-pll.c
drivers/media/dvb-frontends/lgdt3306a.c
drivers/media/dvb-frontends/lgdt330x.c
drivers/media/dvb-frontends/m88ds3103.c
drivers/media/dvb-frontends/mn88443x.c
drivers/media/dvb-frontends/mn88472.c
drivers/media/dvb-frontends/mn88473.c
drivers/media/dvb-frontends/mxl692.c
drivers/media/dvb-frontends/rtl2830.c
drivers/media/dvb-frontends/rtl2832.c
drivers/media/dvb-frontends/si2165.c
drivers/media/dvb-frontends/si2168.c
drivers/media/dvb-frontends/sp2.c
drivers/media/dvb-frontends/stv090x.c
drivers/media/dvb-frontends/stv6110x.c
drivers/media/dvb-frontends/tc90522.c
drivers/media/dvb-frontends/tda10071.c
drivers/media/dvb-frontends/ts2020.c
drivers/media/i2c/ad5820.c
drivers/media/i2c/ad9389b.c
drivers/media/i2c/adp1653.c
drivers/media/i2c/adv7170.c
drivers/media/i2c/adv7175.c
drivers/media/i2c/adv7180.c
drivers/media/i2c/adv7183.c
drivers/media/i2c/adv7343.c
drivers/media/i2c/adv7393.c
drivers/media/i2c/adv748x/adv748x-core.c
drivers/media/i2c/adv7511-v4l2.c
drivers/media/i2c/adv7604.c
drivers/media/i2c/adv7842.c
drivers/media/i2c/ak7375.c
drivers/media/i2c/ak881x.c
drivers/media/i2c/ar0521.c
drivers/media/i2c/bt819.c
drivers/media/i2c/bt856.c
drivers/media/i2c/bt866.c
drivers/media/i2c/ccs/ccs-core.c
drivers/media/i2c/cs3308.c
drivers/media/i2c/cs5345.c
drivers/media/i2c/cs53l32a.c
drivers/media/i2c/cx25840/cx25840-core.c
drivers/media/i2c/dw9714.c
drivers/media/i2c/dw9768.c
drivers/media/i2c/dw9807-vcm.c
drivers/media/i2c/et8ek8/et8ek8_driver.c
drivers/media/i2c/hi556.c
drivers/media/i2c/hi846.c
drivers/media/i2c/hi847.c
drivers/media/i2c/imx208.c
drivers/media/i2c/imx214.c
drivers/media/i2c/imx219.c
drivers/media/i2c/imx258.c
drivers/media/i2c/imx274.c
drivers/media/i2c/imx290.c
drivers/media/i2c/imx319.c
drivers/media/i2c/imx334.c
drivers/media/i2c/imx335.c
drivers/media/i2c/imx355.c
drivers/media/i2c/imx412.c
drivers/media/i2c/ir-kbd-i2c.c
drivers/media/i2c/isl7998x.c
drivers/media/i2c/ks0127.c
drivers/media/i2c/lm3560.c
drivers/media/i2c/lm3646.c
drivers/media/i2c/m52790.c
drivers/media/i2c/m5mols/m5mols_core.c
drivers/media/i2c/max2175.c
drivers/media/i2c/max9286.c
drivers/media/i2c/ml86v7667.c
drivers/media/i2c/msp3400-driver.c
drivers/media/i2c/mt9m001.c
drivers/media/i2c/mt9m032.c
drivers/media/i2c/mt9m111.c
drivers/media/i2c/mt9p031.c
drivers/media/i2c/mt9t001.c
drivers/media/i2c/mt9t112.c
drivers/media/i2c/mt9v011.c
drivers/media/i2c/mt9v032.c
drivers/media/i2c/mt9v111.c
drivers/media/i2c/noon010pc30.c
drivers/media/i2c/og01a1b.c
drivers/media/i2c/ov02a10.c
drivers/media/i2c/ov08d10.c
drivers/media/i2c/ov13858.c
drivers/media/i2c/ov13b10.c
drivers/media/i2c/ov2640.c
drivers/media/i2c/ov2659.c
drivers/media/i2c/ov2680.c
drivers/media/i2c/ov2685.c
drivers/media/i2c/ov2740.c
drivers/media/i2c/ov5640.c
drivers/media/i2c/ov5645.c
drivers/media/i2c/ov5647.c
drivers/media/i2c/ov5648.c
drivers/media/i2c/ov5670.c
drivers/media/i2c/ov5675.c
drivers/media/i2c/ov5693.c
drivers/media/i2c/ov5695.c
drivers/media/i2c/ov6650.c
drivers/media/i2c/ov7251.c
drivers/media/i2c/ov7640.c
drivers/media/i2c/ov7670.c
drivers/media/i2c/ov772x.c
drivers/media/i2c/ov7740.c
drivers/media/i2c/ov8856.c
drivers/media/i2c/ov8865.c
drivers/media/i2c/ov9282.c
drivers/media/i2c/ov9640.c
drivers/media/i2c/ov9650.c
drivers/media/i2c/ov9734.c
drivers/media/i2c/rdacm20.c
drivers/media/i2c/rdacm21.c
drivers/media/i2c/rj54n1cb0c.c
drivers/media/i2c/s5c73m3/s5c73m3-core.c
drivers/media/i2c/s5k4ecgx.c
drivers/media/i2c/s5k5baf.c
drivers/media/i2c/s5k6a3.c
drivers/media/i2c/s5k6aa.c
drivers/media/i2c/saa6588.c
drivers/media/i2c/saa6752hs.c
drivers/media/i2c/saa7110.c
drivers/media/i2c/saa7115.c
drivers/media/i2c/saa7127.c
drivers/media/i2c/saa717x.c
drivers/media/i2c/saa7185.c
drivers/media/i2c/sony-btf-mpx.c
drivers/media/i2c/sr030pc30.c
drivers/media/i2c/st-mipid02.c
drivers/media/i2c/tc358743.c
drivers/media/i2c/tda1997x.c
drivers/media/i2c/tda7432.c
drivers/media/i2c/tda9840.c
drivers/media/i2c/tea6415c.c
drivers/media/i2c/tea6420.c
drivers/media/i2c/ths7303.c
drivers/media/i2c/ths8200.c
drivers/media/i2c/tlv320aic23b.c
drivers/media/i2c/tvaudio.c
drivers/media/i2c/tvp514x.c
drivers/media/i2c/tvp5150.c
drivers/media/i2c/tvp7002.c
drivers/media/i2c/tw2804.c
drivers/media/i2c/tw9903.c
drivers/media/i2c/tw9906.c
drivers/media/i2c/tw9910.c
drivers/media/i2c/uda1342.c
drivers/media/i2c/upd64031a.c
drivers/media/i2c/upd64083.c
drivers/media/i2c/video-i2c.c
drivers/media/i2c/vp27smpx.c
drivers/media/i2c/vpx3220.c
drivers/media/i2c/vs6624.c
drivers/media/i2c/wm8739.c
drivers/media/i2c/wm8775.c
drivers/media/radio/radio-tea5764.c
drivers/media/radio/saa7706h.c
drivers/media/radio/si470x/radio-si470x-i2c.c
drivers/media/radio/si4713/si4713.c
drivers/media/radio/tef6862.c
drivers/media/test-drivers/vidtv/vidtv_demod.c
drivers/media/test-drivers/vidtv/vidtv_tuner.c
drivers/media/tuners/e4000.c
drivers/media/tuners/fc2580.c
drivers/media/tuners/m88rs6000t.c
drivers/media/tuners/mt2060.c
drivers/media/tuners/mxl301rf.c
drivers/media/tuners/qm1d1b0004.c
drivers/media/tuners/qm1d1c0042.c
drivers/media/tuners/si2157.c
drivers/media/tuners/tda18212.c
drivers/media/tuners/tda18250.c
drivers/media/tuners/tua9001.c
drivers/media/usb/go7007/s2250-board.c
drivers/media/v4l2-core/tuner-core.c
drivers/mfd/88pm800.c
drivers/mfd/88pm805.c
drivers/mfd/88pm860x-core.c
drivers/mfd/acer-ec-a500.c
drivers/mfd/arizona-i2c.c
drivers/mfd/axp20x-i2c.c
drivers/mfd/da903x.c
drivers/mfd/da9052-i2c.c
drivers/mfd/da9055-i2c.c
drivers/mfd/da9062-core.c
drivers/mfd/da9150-core.c
drivers/mfd/dm355evm_msp.c
drivers/mfd/ene-kb3930.c
drivers/mfd/gateworks-gsc.c
drivers/mfd/intel_soc_pmic_core.c
drivers/mfd/iqs62x.c
drivers/mfd/lm3533-core.c
drivers/mfd/lp8788.c
drivers/mfd/madera-i2c.c
drivers/mfd/max14577.c
drivers/mfd/max77693.c
drivers/mfd/max8907.c
drivers/mfd/max8925-i2c.c
drivers/mfd/mc13xxx-i2c.c
drivers/mfd/menelaus.c
drivers/mfd/ntxec.c
drivers/mfd/palmas.c
drivers/mfd/pcf50633-core.c
drivers/mfd/retu-mfd.c
drivers/mfd/rk808.c
drivers/mfd/rn5t618.c
drivers/mfd/rsmu_i2c.c
drivers/mfd/rt4831.c
drivers/mfd/si476x-i2c.c
drivers/mfd/stmfx.c
drivers/mfd/stmpe-i2c.c
drivers/mfd/tc3589x.c
drivers/mfd/tps6105x.c
drivers/mfd/tps65010.c
drivers/mfd/tps65086.c
drivers/mfd/tps65217.c
drivers/mfd/tps6586x.c
drivers/mfd/tps65912-i2c.c
drivers/mfd/twl-core.c
drivers/mfd/twl6040.c
drivers/mfd/wm8994-core.c
drivers/misc/ad525x_dpot-i2c.c
drivers/misc/apds9802als.c
drivers/misc/apds990x.c
drivers/misc/bh1770glc.c
drivers/misc/ds1682.c
drivers/misc/eeprom/at24.c
drivers/misc/eeprom/ee1004.c
drivers/misc/eeprom/eeprom.c
drivers/misc/eeprom/idt_89hpesx.c
drivers/misc/eeprom/max6875.c
drivers/misc/hmc6352.c
drivers/misc/ics932s401.c
drivers/misc/isl29003.c
drivers/misc/isl29020.c
drivers/misc/lis3lv02d/lis3lv02d_i2c.c
drivers/misc/tsl2550.c
drivers/mtd/maps/pismo.c
drivers/net/dsa/lan9303_i2c.c
drivers/net/dsa/microchip/ksz9477_i2c.c
drivers/net/dsa/xrs700x/xrs700x_i2c.c
drivers/net/ethernet/mellanox/mlxsw/i2c.c
drivers/net/mctp/mctp-i2c.c
drivers/nfc/fdp/i2c.c
drivers/nfc/microread/i2c.c
drivers/nfc/nfcmrvl/i2c.c
drivers/nfc/nxp-nci/i2c.c
drivers/nfc/pn533/i2c.c
drivers/nfc/pn544/i2c.c
drivers/nfc/s3fwrn5/i2c.c
drivers/nfc/st-nci/i2c.c
drivers/nfc/st21nfca/i2c.c
drivers/of/unittest.c
drivers/platform/chrome/cros_ec_i2c.c
drivers/platform/surface/surface3_power.c
drivers/platform/x86/asus-tf103c-dock.c
drivers/platform/x86/intel/int3472/tps68470.c
drivers/power/supply/bq2415x_charger.c
drivers/power/supply/bq24190_charger.c
drivers/power/supply/bq24257_charger.c
drivers/power/supply/bq25890_charger.c
drivers/power/supply/bq27xxx_battery_i2c.c
drivers/power/supply/cw2015_battery.c
drivers/power/supply/ds2782_battery.c
drivers/power/supply/lp8727_charger.c
drivers/power/supply/rt5033_battery.c
drivers/power/supply/rt9455_charger.c
drivers/power/supply/smb347-charger.c
drivers/power/supply/z2_battery.c
drivers/pwm/pwm-pca9685.c
drivers/regulator/da9121-regulator.c
drivers/regulator/lp8755.c
drivers/regulator/rpi-panel-attiny-regulator.c
drivers/rtc/rtc-bq32k.c
drivers/rtc/rtc-ds1374.c
drivers/rtc/rtc-isl12026.c
drivers/rtc/rtc-m41t80.c
drivers/rtc/rtc-rs5c372.c
drivers/rtc/rtc-x1205.c
drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c
drivers/staging/media/max96712/max96712.c
drivers/staging/most/i2c/i2c.c
drivers/staging/olpc_dcon/olpc_dcon.c
drivers/tty/serial/max310x.c
drivers/tty/serial/sc16is7xx.c
drivers/usb/misc/usb3503.c
drivers/usb/phy/phy-isp1301-omap.c
drivers/usb/phy/phy-isp1301.c
drivers/usb/typec/anx7411.c
drivers/usb/typec/hd3ss3220.c
drivers/usb/typec/mux/fsa4480.c
drivers/usb/typec/mux/pi3usb30532.c
drivers/usb/typec/rt1719.c
drivers/usb/typec/stusb160x.c
drivers/usb/typec/tcpm/fusb302.c
drivers/usb/typec/tcpm/tcpci.c
drivers/usb/typec/tcpm/tcpci_maxim.c
drivers/usb/typec/tcpm/tcpci_rt1711h.c
drivers/usb/typec/tipd/core.c
drivers/usb/typec/ucsi/ucsi_ccg.c
drivers/usb/typec/ucsi/ucsi_stm32g0.c
drivers/usb/typec/wusb3801.c
drivers/video/backlight/adp8860_bl.c
drivers/video/backlight/adp8870_bl.c
drivers/video/backlight/arcxcnn_bl.c
drivers/video/backlight/bd6107.c
drivers/video/backlight/lm3630a_bl.c
drivers/video/backlight/lm3639_bl.c
drivers/video/backlight/lp855x_bl.c
drivers/video/backlight/lv5207lp.c
drivers/video/backlight/tosa_bl.c
drivers/video/fbdev/matrox/matroxfb_maven.c
drivers/video/fbdev/ssd1307fb.c
drivers/w1/masters/ds2482.c
drivers/watchdog/ziirave_wdt.c
include/linux/i2c.h
include/linux/platform_data/pca953x.h
sound/aoa/codecs/onyx.c
sound/aoa/codecs/tas.c
sound/pci/hda/cs35l41_hda_i2c.c
sound/ppc/keywest.c
sound/soc/codecs/adau1761-i2c.c
sound/soc/codecs/adau1781-i2c.c
sound/soc/codecs/ak4375.c
sound/soc/codecs/ak4458.c
sound/soc/codecs/ak4641.c
sound/soc/codecs/ak5558.c
sound/soc/codecs/cs35l32.c
sound/soc/codecs/cs35l33.c
sound/soc/codecs/cs35l34.c
sound/soc/codecs/cs35l35.c
sound/soc/codecs/cs35l36.c
sound/soc/codecs/cs35l41-i2c.c
sound/soc/codecs/cs35l45-i2c.c
sound/soc/codecs/cs4234.c
sound/soc/codecs/cs4265.c
sound/soc/codecs/cs4270.c
sound/soc/codecs/cs42l42.c
sound/soc/codecs/cs42l51-i2c.c
sound/soc/codecs/cs42l56.c
sound/soc/codecs/cs42xx8-i2c.c
sound/soc/codecs/cs43130.c
sound/soc/codecs/cs4349.c
sound/soc/codecs/cs53l30.c
sound/soc/codecs/cx2072x.c
sound/soc/codecs/max98090.c
sound/soc/codecs/max9860.c
sound/soc/codecs/max98927.c
sound/soc/codecs/mt6660.c
sound/soc/codecs/nau8825.c
sound/soc/codecs/pcm1789-i2c.c
sound/soc/codecs/pcm3168a-i2c.c
sound/soc/codecs/pcm512x-i2c.c
sound/soc/codecs/rt274.c
sound/soc/codecs/rt286.c
sound/soc/codecs/rt298.c
sound/soc/codecs/rt5616.c
sound/soc/codecs/rt5631.c
sound/soc/codecs/rt5645.c
sound/soc/codecs/rt5663.c
sound/soc/codecs/rt5670.c
sound/soc/codecs/rt5677.c
sound/soc/codecs/rt5682-i2c.c
sound/soc/codecs/rt5682s.c
sound/soc/codecs/rt9120.c
sound/soc/codecs/sgtl5000.c
sound/soc/codecs/sta350.c
sound/soc/codecs/tas2552.c
sound/soc/codecs/tas5086.c
sound/soc/codecs/tas571x.c
sound/soc/codecs/tas5805m.c
sound/soc/codecs/tas6424.c
sound/soc/codecs/tlv320adc3xxx.c
sound/soc/codecs/tlv320aic32x4-i2c.c
sound/soc/codecs/tlv320aic3x-i2c.c
sound/soc/codecs/tlv320dac33.c
sound/soc/codecs/wm1250-ev1.c
sound/soc/codecs/wm2200.c
sound/soc/codecs/wm5100.c
sound/soc/codecs/wm8804-i2c.c
sound/soc/codecs/wm8900.c
sound/soc/codecs/wm8903.c
sound/soc/codecs/wm8960.c
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8993.c
sound/soc/codecs/wm8996.c
sound/soc/codecs/wm9081.c

index 529bea5..4656f51 100644 (file)
@@ -23,6 +23,7 @@ properties:
               - fsl,imx8dxl-lpi2c
               - fsl,imx8qm-lpi2c
               - fsl,imx8ulp-lpi2c
+              - fsl,imx93-lpi2c
           - const: fsl,imx7ulp-lpi2c
 
   reg:
@@ -37,10 +38,22 @@ properties:
   clock-frequency: true
 
   clock-names:
-    maxItems: 1
+    items:
+      - const: per
+      - const: ipg
 
   clocks:
-    maxItems: 1
+    maxItems: 2
+
+  dmas:
+    items:
+      - description: DMA controller phandle and request line for TX
+      - description: DMA controller phandle and request line for RX
+
+  dma-names:
+    items:
+      - const: tx
+      - const: rx
 
   power-domains:
     maxItems: 1
@@ -63,5 +76,6 @@ examples:
         reg = <0x40A50000 0x10000>;
         interrupt-parent = <&intc>;
         interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-        clocks = <&clks IMX7ULP_CLK_LPI2C7>;
+        clocks = <&clks IMX7ULP_CLK_LPI2C7>,
+                 <&clks IMX7ULP_CLK_NIC1_BUS_DIV>;
     };
index 01720e3..85ee128 100644 (file)
@@ -19,6 +19,17 @@ properties:
       - const: fsl,imx21-i2c
       - const: fsl,vf610-i2c
       - items:
+          - enum:
+              - fsl,ls1012a-i2c
+              - fsl,ls1021a-i2c
+              - fsl,ls1028a-i2c
+              - fsl,ls1043a-i2c
+              - fsl,ls1046a-i2c
+              - fsl,ls1088a-i2c
+              - fsl,ls208xa-i2c
+              - fsl,lx2160a-i2c
+          - const: fsl,vf610-i2c
+      - items:
           - const: fsl,imx35-i2c
           - const: fsl,imx1-i2c
       - items:
index ee9f8b9..82b9d66 100644 (file)
@@ -29,6 +29,7 @@ properties:
       - items:
           - enum:
               - rockchip,rk3036-i2c
+              - rockchip,rk3128-i2c
               - rockchip,rk3368-i2c
           - const: rockchip,rk3288-i2c
       - items:
index 0ec033e..63d665a 100644 (file)
@@ -66,6 +66,19 @@ properties:
   resets:
     maxItems: 1
 
+  dmas:
+    items:
+      - description: RX DMA Channel
+      - description: TX DMA Channel
+
+  dma-names:
+    items:
+      - const: rx
+      - const: tx
+
+dependencies:
+  dmas: [ dma-names ]
+
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml b/Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml
deleted file mode 100644 (file)
index 93198d5..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/i2c/mellanox,i2c-mlxbf.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Mellanox I2C SMBus on BlueField SoCs
-
-maintainers:
-  - Khalil Blaiech <kblaiech@nvidia.com>
-
-allOf:
-  - $ref: /schemas/i2c/i2c-controller.yaml#
-
-properties:
-  compatible:
-    enum:
-      - mellanox,i2c-mlxbf1
-      - mellanox,i2c-mlxbf2
-
-  reg:
-    minItems: 3
-    items:
-      - description: Smbus block registers
-      - description: Cause master registers
-      - description: Cause slave registers
-      - description: Cause coalesce registers
-
-  interrupts:
-    maxItems: 1
-
-  clock-frequency:
-    enum: [ 100000, 400000, 1000000 ]
-    description:
-      bus frequency used to configure timing registers;
-      The frequency is expressed in Hz. Default is 100000.
-
-required:
-  - compatible
-  - reg
-  - interrupts
-
-unevaluatedProperties: false
-
-if:
-  properties:
-    compatible:
-      contains:
-        enum:
-          - mellanox,i2c-mlxbf1
-
-then:
-  properties:
-    reg:
-      maxItems: 3
-
-examples:
-  - |
-    i2c@2804000 {
-        compatible = "mellanox,i2c-mlxbf1";
-        reg = <0x02804000 0x800>,
-              <0x02801200 0x020>,
-              <0x02801260 0x020>;
-        interrupts = <57>;
-        clock-frequency = <100000>;
-    };
-
-  - |
-    i2c@2808800 {
-        compatible = "mellanox,i2c-mlxbf2";
-        reg = <0x02808800 0x600>,
-              <0x02808e00 0x020>,
-              <0x02808e20 0x020>,
-              <0x02808e40 0x010>;
-        interrupts = <57>;
-        clock-frequency = <400000>;
-    };
index 90c9e40..e51a858 100644 (file)
@@ -126,6 +126,7 @@ allOf:
           contains:
             enum:
               - qcom,sm8250-cci
+              - qcom,sm8450-cci
     then:
       properties:
         clocks:
index f992957..c4ace55 100644 (file)
@@ -52,6 +52,7 @@ properties:
           - enum:
               - renesas,i2c-r8a779a0     # R-Car V3U
               - renesas,i2c-r8a779f0     # R-Car S4-8
+              - renesas,i2c-r8a779g0     # R-Car V4H
           - const: renesas,rcar-gen4-i2c # R-Car Gen4
 
   reg:
index 58fb143..3f0d320 100644 (file)
@@ -72,12 +72,15 @@ Event types:
 
   'val': unused
 
-  'ret': always 0
+  'ret': 0 if the backend is ready, otherwise some errno
 
 Another I2C master wants to write data to us. This event should be sent once
 our own address and the write bit was detected. The data did not arrive yet, so
-there is nothing to process or return. Wakeup or initialization probably needs
-to be done, though.
+there is nothing to process or return. After returning, the bus driver must
+always ack the address phase. If 'ret' is zero, backend initialization or
+wakeup is done and further data may be received. If 'ret' is an errno, the bus
+driver should nack all incoming bytes until the next stop condition to enforce
+a retry of the transmission.
 
 * I2C_SLAVE_READ_REQUESTED (mandatory)
 
index 47f7cbf..b7d3ae7 100644 (file)
@@ -156,7 +156,7 @@ those devices, and a remove() method to unbind.
 ::
 
        static int foo_probe(struct i2c_client *client);
-       static int foo_remove(struct i2c_client *client);
+       static void foo_remove(struct i2c_client *client);
 
 Remember that the i2c_driver does not create those client handles.  The
 handle may be used during foo_probe().  If foo_probe() reports success
index 9ca84cb..a8e6884 100644 (file)
@@ -12982,9 +12982,9 @@ F:      drivers/input/touchscreen/melfas_mip4.c
 
 MELLANOX BLUEFIELD I2C DRIVER
 M:     Khalil Blaiech <kblaiech@nvidia.com>
+M:     Asmaa Mnebhi <asmaa@nvidia.com>
 L:     linux-i2c@vger.kernel.org
 S:     Supported
-F:     Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml
 F:     drivers/i2c/busses/i2c-mlxbf.c
 
 MELLANOX ETHERNET DRIVER (mlx4_en)
@@ -13433,6 +13433,14 @@ F:     Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml
 F:     drivers/nvmem/microchip-otpc.c
 F:     include/dt-bindings/nvmem/microchip,sama7g5-otpc.h
 
+MICROCHIP PCI1XXXX I2C DRIVER
+M:     Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
+M:     Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
+M:     Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
+L:     linux-i2c@vger.kernel.org
+S:     Maintained
+F:     drivers/i2c/busses/i2c-mchp-pci1xxxx.c
+
 MICROCHIP PWM DRIVER
 M:     Claudiu Beznea <claudiu.beznea@microchip.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
index 92d74bc..d752ee2 100644 (file)
@@ -516,8 +516,8 @@ exp_setup_sela_fail:
        return ret;
 }
 
-static int da850_evm_ui_expander_teardown(struct i2c_client *client,
-                                       unsigned gpio, unsigned ngpio, void *c)
+static void da850_evm_ui_expander_teardown(struct i2c_client *client,
+                                          unsigned gpio, unsigned ngpio, void *c)
 {
        platform_device_unregister(&da850_evm_ui_keys_device);
 
@@ -529,8 +529,6 @@ static int da850_evm_ui_expander_teardown(struct i2c_client *client,
        gpio_free(gpio + DA850_EVM_UI_EXP_SEL_C);
        gpio_free(gpio + DA850_EVM_UI_EXP_SEL_B);
        gpio_free(gpio + DA850_EVM_UI_EXP_SEL_A);
-
-       return 0;
 }
 
 /* assign the baseboard expander's GPIOs after the UI board's */
@@ -697,13 +695,11 @@ io_exp_setup_sw_fail:
        return ret;
 }
 
-static int da850_evm_bb_expander_teardown(struct i2c_client *client,
-                                       unsigned gpio, unsigned ngpio, void *c)
+static void da850_evm_bb_expander_teardown(struct i2c_client *client,
+                                          unsigned gpio, unsigned ngpio, void *c)
 {
        platform_device_unregister(&da850_evm_bb_leds_device);
        platform_device_unregister(&da850_evm_bb_keys_device);
-
-       return 0;
 }
 
 static struct pca953x_platform_data da850_evm_ui_expander_info = {
index abb62fa..77ed613 100644 (file)
@@ -178,7 +178,7 @@ err:
        return ret;
 }
 
-static int mcu_remove(struct i2c_client *client)
+static void mcu_remove(struct i2c_client *client)
 {
        struct mcu *mcu = i2c_get_clientdata(client);
 
@@ -193,7 +193,6 @@ static int mcu_remove(struct i2c_client *client)
 
        mcu_gpiochip_remove(mcu);
        kfree(mcu);
-       return 0;
 }
 
 static const struct i2c_device_id mcu_ids[] = {
index 4fab3b2..0242599 100644 (file)
@@ -775,7 +775,7 @@ static int ht16k33_probe(struct i2c_client *client)
        return err;
 }
 
-static int ht16k33_remove(struct i2c_client *client)
+static void ht16k33_remove(struct i2c_client *client)
 {
        struct ht16k33_priv *priv = i2c_get_clientdata(client);
        struct ht16k33_fbdev *fbdev = &priv->fbdev;
@@ -796,8 +796,6 @@ static int ht16k33_remove(struct i2c_client *client)
                device_remove_file(&client->dev, &dev_attr_map_seg14);
                break;
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id ht16k33_i2c_match[] = {
index e465108..135831a 100644 (file)
@@ -340,13 +340,12 @@ fail1:
        return err;
 }
 
-static int lcd2s_i2c_remove(struct i2c_client *i2c)
+static void lcd2s_i2c_remove(struct i2c_client *i2c)
 {
        struct lcd2s_data *lcd2s = i2c_get_clientdata(i2c);
 
        charlcd_unregister(lcd2s->charlcd);
        charlcd_free(lcd2s->charlcd);
-       return 0;
 }
 
 static const struct i2c_device_id lcd2s_i2c_id[] = {
index db40037..a0e9e80 100644 (file)
@@ -341,14 +341,12 @@ static int ipmb_probe(struct i2c_client *client)
        return 0;
 }
 
-static int ipmb_remove(struct i2c_client *client)
+static void ipmb_remove(struct i2c_client *client)
 {
        struct ipmb_dev *ipmb_dev = i2c_get_clientdata(client);
 
        i2c_slave_unregister(client);
        misc_deregister(&ipmb_dev->miscdev);
-
-       return 0;
 }
 
 static const struct i2c_device_id ipmb_id[] = {
index ab19b4b..25c010c 100644 (file)
@@ -424,7 +424,7 @@ static void ipmi_ipmb_request_events(void *send_info)
        /* We don't fetch events here. */
 }
 
-static int ipmi_ipmb_remove(struct i2c_client *client)
+static void ipmi_ipmb_remove(struct i2c_client *client)
 {
        struct ipmi_ipmb_dev *iidev = i2c_get_clientdata(client);
 
@@ -438,8 +438,6 @@ static int ipmi_ipmb_remove(struct i2c_client *client)
        ipmi_ipmb_stop_thread(iidev);
 
        ipmi_unregister_smi(iidev->intf);
-
-       return 0;
 }
 
 static int ipmi_ipmb_probe(struct i2c_client *client)
index fc742ee..13da021 100644 (file)
@@ -1281,13 +1281,13 @@ static void shutdown_ssif(void *send_info)
        }
 }
 
-static int ssif_remove(struct i2c_client *client)
+static void ssif_remove(struct i2c_client *client)
 {
        struct ssif_info *ssif_info = i2c_get_clientdata(client);
        struct ssif_addr_info *addr_info;
 
        if (!ssif_info)
-               return 0;
+               return;
 
        /*
         * After this point, we won't deliver anything asychronously
@@ -1303,8 +1303,6 @@ static int ssif_remove(struct i2c_client *client)
        }
 
        kfree(ssif_info);
-
-       return 0;
 }
 
 static int read_response(struct i2c_client *client, unsigned char *resp)
index 3170d59..a3aa411 100644 (file)
@@ -264,13 +264,11 @@ static int st33zp24_i2c_probe(struct i2c_client *client,
  * @param: client, the i2c_client description (TPM I2C description).
  * @return: 0 in case of success.
  */
-static int st33zp24_i2c_remove(struct i2c_client *client)
+static void st33zp24_i2c_remove(struct i2c_client *client)
 {
        struct tpm_chip *chip = i2c_get_clientdata(client);
 
        st33zp24_remove(chip);
-
-       return 0;
 }
 
 static const struct i2c_device_id st33zp24_i2c_id[] = {
index d5ac855..4be3677 100644 (file)
@@ -179,12 +179,11 @@ static int i2c_atmel_probe(struct i2c_client *client,
        return tpm_chip_register(chip);
 }
 
-static int i2c_atmel_remove(struct i2c_client *client)
+static void i2c_atmel_remove(struct i2c_client *client)
 {
        struct device *dev = &(client->dev);
        struct tpm_chip *chip = dev_get_drvdata(dev);
        tpm_chip_unregister(chip);
-       return 0;
 }
 
 static const struct i2c_device_id i2c_atmel_id[] = {
index a19d32c..fd3c366 100644 (file)
@@ -706,15 +706,13 @@ static int tpm_tis_i2c_probe(struct i2c_client *client,
        return rc;
 }
 
-static int tpm_tis_i2c_remove(struct i2c_client *client)
+static void tpm_tis_i2c_remove(struct i2c_client *client)
 {
        struct tpm_chip *chip = tpm_dev.chip;
 
        tpm_chip_unregister(chip);
        release_locality(chip, tpm_dev.locality, 1);
        tpm_dev.client = NULL;
-
-       return 0;
 }
 
 static struct i2c_driver tpm_tis_i2c_driver = {
index b77c18e..95c3735 100644 (file)
@@ -622,12 +622,11 @@ static int i2c_nuvoton_probe(struct i2c_client *client,
        return tpm_chip_register(chip);
 }
 
-static int i2c_nuvoton_remove(struct i2c_client *client)
+static void i2c_nuvoton_remove(struct i2c_client *client)
 {
        struct tpm_chip *chip = i2c_get_clientdata(client);
 
        tpm_chip_unregister(chip);
-       return 0;
 }
 
 static const struct i2c_device_id i2c_nuvoton_id[] = {
index ba0911b..0692510 100644 (file)
@@ -351,13 +351,12 @@ static int tpm_tis_i2c_probe(struct i2c_client *dev,
                                 NULL);
 }
 
-static int tpm_tis_i2c_remove(struct i2c_client *client)
+static void tpm_tis_i2c_remove(struct i2c_client *client)
 {
        struct tpm_chip *chip = i2c_get_clientdata(client);
 
        tpm_chip_unregister(chip);
        tpm_tis_remove(chip);
-       return 0;
 }
 
 static const struct i2c_device_id tpm_tis_i2c_id[] = {
index 974479a..77cea5b 100644 (file)
@@ -763,20 +763,18 @@ static int tpm_cr50_i2c_probe(struct i2c_client *client)
  * - 0:                Success.
  * - -errno:   A POSIX error code.
  */
-static int tpm_cr50_i2c_remove(struct i2c_client *client)
+static void tpm_cr50_i2c_remove(struct i2c_client *client)
 {
        struct tpm_chip *chip = i2c_get_clientdata(client);
        struct device *dev = &client->dev;
 
        if (!chip) {
                dev_crit(dev, "Could not get client data at remove, memory corruption ahead\n");
-               return 0;
+               return;
        }
 
        tpm_chip_unregister(chip);
        tpm_cr50_release_locality(chip, true);
-
-       return 0;
 }
 
 static SIMPLE_DEV_PM_OPS(cr50_i2c_pm, tpm_pm_suspend, tpm_pm_resume);
index 5467d94..1449d05 100644 (file)
@@ -665,10 +665,9 @@ static int cdce706_probe(struct i2c_client *client)
                                      cdce);
 }
 
-static int cdce706_remove(struct i2c_client *client)
+static void cdce706_remove(struct i2c_client *client)
 {
        of_clk_del_provider(client->dev.of_node);
-       return 0;
 }
 
 
index aa5c72b..320d399 100644 (file)
@@ -557,7 +557,7 @@ static int cs2000_version_print(struct cs2000_priv *priv)
        return 0;
 }
 
-static int cs2000_remove(struct i2c_client *client)
+static void cs2000_remove(struct i2c_client *client)
 {
        struct cs2000_priv *priv = i2c_get_clientdata(client);
        struct device *dev = priv_to_dev(priv);
@@ -566,8 +566,6 @@ static int cs2000_remove(struct i2c_client *client)
        of_clk_del_provider(np);
 
        clk_hw_unregister(&priv->hw);
-
-       return 0;
 }
 
 static int cs2000_probe(struct i2c_client *client)
index 4481c43..c028fa1 100644 (file)
@@ -370,10 +370,9 @@ static int si514_probe(struct i2c_client *client)
        return 0;
 }
 
-static int si514_remove(struct i2c_client *client)
+static void si514_remove(struct i2c_client *client)
 {
        of_clk_del_provider(client->dev.of_node);
-       return 0;
 }
 
 static const struct i2c_device_id si514_id[] = {
index 4bca732..0e528d7 100644 (file)
@@ -1796,7 +1796,7 @@ cleanup:
        return err;
 }
 
-static int si5341_remove(struct i2c_client *client)
+static void si5341_remove(struct i2c_client *client)
 {
        struct clk_si5341 *data = i2c_get_clientdata(client);
        int i;
@@ -1807,8 +1807,6 @@ static int si5341_remove(struct i2c_client *client)
                if (data->clk[i].vddo_reg)
                        regulator_disable(data->clk[i].vddo_reg);
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id si5341_id[] = {
index b9f088c..9e939c9 100644 (file)
@@ -1651,11 +1651,9 @@ static int si5351_i2c_probe(struct i2c_client *client)
        return 0;
 }
 
-static int si5351_i2c_remove(struct i2c_client *client)
+static void si5351_i2c_remove(struct i2c_client *client)
 {
        of_clk_del_provider(client->dev.of_node);
-
-       return 0;
 }
 
 static struct i2c_driver si5351_driver = {
index 1ff8f32..0a6d70c 100644 (file)
@@ -498,10 +498,9 @@ static int si570_probe(struct i2c_client *client)
        return 0;
 }
 
-static int si570_remove(struct i2c_client *client)
+static void si570_remove(struct i2c_client *client)
 {
        of_clk_del_provider(client->dev.of_node);
-       return 0;
 }
 
 static const struct of_device_id clk_si570_of_match[] = {
index e7be3e5..657493e 100644 (file)
@@ -1138,7 +1138,7 @@ err_clk:
        return ret;
 }
 
-static int vc5_remove(struct i2c_client *client)
+static void vc5_remove(struct i2c_client *client)
 {
        struct vc5_driver_data *vc5 = i2c_get_clientdata(client);
 
@@ -1146,8 +1146,6 @@ static int vc5_remove(struct i2c_client *client)
 
        if (vc5->chip_info->flags & VC5_HAS_INTERNAL_XTAL)
                clk_unregister_fixed_rate(vc5->pin_xin);
-
-       return 0;
 }
 
 static int __maybe_unused vc5_suspend(struct device *dev)
index a4b13d3..82bf15d 100644 (file)
@@ -343,7 +343,7 @@ static int atmel_ecc_probe(struct i2c_client *client,
        return ret;
 }
 
-static int atmel_ecc_remove(struct i2c_client *client)
+static void atmel_ecc_remove(struct i2c_client *client)
 {
        struct atmel_i2c_client_priv *i2c_priv = i2c_get_clientdata(client);
 
@@ -358,7 +358,7 @@ static int atmel_ecc_remove(struct i2c_client *client)
                 * accessing the freed memory.
                 */
                dev_emerg(&client->dev, "Device is busy, expect memory corruption.\n");
-               return 0;
+               return;
        }
 
        crypto_unregister_kpp(&atmel_ecdh_nist_p256);
@@ -366,8 +366,6 @@ static int atmel_ecc_remove(struct i2c_client *client)
        spin_lock(&driver_data.i2c_list_lock);
        list_del(&i2c_priv->i2c_client_list_node);
        spin_unlock(&driver_data.i2c_list_lock);
-
-       return 0;
 }
 
 #ifdef CONFIG_OF
index e4087bd..a84b657 100644 (file)
@@ -116,18 +116,16 @@ static int atmel_sha204a_probe(struct i2c_client *client,
        return ret;
 }
 
-static int atmel_sha204a_remove(struct i2c_client *client)
+static void atmel_sha204a_remove(struct i2c_client *client)
 {
        struct atmel_i2c_client_priv *i2c_priv = i2c_get_clientdata(client);
 
        if (atomic_read(&i2c_priv->tfm_count)) {
                dev_emerg(&client->dev, "Device is busy, will remove it anyhow\n");
-               return 0;
+               return;
        }
 
        kfree((void *)i2c_priv->hwrng.priv);
-
-       return 0;
 }
 
 static const struct of_device_id atmel_sha204a_dt_ids[] = {
index 02ba770..e6e448f 100644 (file)
@@ -646,13 +646,11 @@ static int rt8973a_muic_i2c_probe(struct i2c_client *i2c,
        return 0;
 }
 
-static int rt8973a_muic_i2c_remove(struct i2c_client *i2c)
+static void rt8973a_muic_i2c_remove(struct i2c_client *i2c)
 {
        struct rt8973a_muic_info *info = i2c_get_clientdata(i2c);
 
        regmap_del_irq_chip(info->irq, info->irq_data);
-
-       return 0;
 }
 
 static const struct of_device_id rt8973a_dt_match[] = {
index d49f125..9b562db 100644 (file)
@@ -409,14 +409,12 @@ static int adp5588_gpio_probe(struct i2c_client *client)
        return 0;
 }
 
-static int adp5588_gpio_remove(struct i2c_client *client)
+static void adp5588_gpio_remove(struct i2c_client *client)
 {
        struct adp5588_gpio *dev = i2c_get_clientdata(client);
 
        if (dev->client->irq)
                free_irq(dev->client->irq, dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id adp5588_gpio_id[] = {
index b2b547d..43da381 100644 (file)
@@ -48,11 +48,9 @@ static int max7300_probe(struct i2c_client *client,
        return __max730x_probe(ts);
 }
 
-static int max7300_remove(struct i2c_client *client)
+static void max7300_remove(struct i2c_client *client)
 {
        __max730x_remove(&client->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id max7300_id[] = {
index 2925f4d..cf9bf3f 100644 (file)
@@ -1101,24 +1101,17 @@ err_exit:
        return ret;
 }
 
-static int pca953x_remove(struct i2c_client *client)
+static void pca953x_remove(struct i2c_client *client)
 {
        struct pca953x_platform_data *pdata = dev_get_platdata(&client->dev);
        struct pca953x_chip *chip = i2c_get_clientdata(client);
-       int ret;
 
        if (pdata && pdata->teardown) {
-               ret = pdata->teardown(client, chip->gpio_chip.base,
-                                     chip->gpio_chip.ngpio, pdata->context);
-               if (ret < 0)
-                       dev_err(&client->dev, "teardown failed, %d\n", ret);
-       } else {
-               ret = 0;
+               pdata->teardown(client, chip->gpio_chip.base,
+                               chip->gpio_chip.ngpio, pdata->context);
        }
 
        regulator_disable(chip->regulator);
-
-       return ret;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 59cc27e..e98ea47 100644 (file)
@@ -399,7 +399,7 @@ fail:
        return status;
 }
 
-static int pcf857x_remove(struct i2c_client *client)
+static void pcf857x_remove(struct i2c_client *client)
 {
        struct pcf857x_platform_data    *pdata = dev_get_platdata(&client->dev);
        struct pcf857x                  *gpio = i2c_get_clientdata(client);
@@ -407,8 +407,6 @@ static int pcf857x_remove(struct i2c_client *client)
        if (pdata && pdata->teardown)
                pdata->teardown(client, gpio->chip.base, gpio->chip.ngpio,
                                pdata->context);
-
-       return 0;
 }
 
 static void pcf857x_shutdown(struct i2c_client *client)
index a09b1e6..d642c35 100644 (file)
@@ -126,13 +126,11 @@ static int tpic2810_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tpic2810_remove(struct i2c_client *client)
+static void tpic2810_remove(struct i2c_client *client)
 {
        struct tpic2810 *gpio = i2c_get_clientdata(client);
 
        gpiochip_remove(&gpio->chip);
-
-       return 0;
 }
 
 static const struct i2c_device_id tpic2810_id_table[] = {
index 38bf287..35d8a9e 100644 (file)
@@ -1336,7 +1336,7 @@ uninit_regulators:
        return ret;
 }
 
-static int adv7511_remove(struct i2c_client *i2c)
+static void adv7511_remove(struct i2c_client *i2c)
 {
        struct adv7511 *adv7511 = i2c_get_clientdata(i2c);
 
@@ -1353,8 +1353,6 @@ static int adv7511_remove(struct i2c_client *i2c)
 
        i2c_unregister_device(adv7511->i2c_packet);
        i2c_unregister_device(adv7511->i2c_edid);
-
-       return 0;
 }
 
 static const struct i2c_device_id adv7511_i2c_ids[] = {
index ae3d6e9..660a548 100644 (file)
@@ -787,7 +787,7 @@ err_unregister_i2c:
        return err;
 }
 
-static int anx6345_i2c_remove(struct i2c_client *client)
+static void anx6345_i2c_remove(struct i2c_client *client)
 {
        struct anx6345 *anx6345 = i2c_get_clientdata(client);
 
@@ -798,8 +798,6 @@ static int anx6345_i2c_remove(struct i2c_client *client)
        kfree(anx6345->edid);
 
        mutex_destroy(&anx6345->lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id anx6345_id[] = {
index d2fc867..5997049 100644 (file)
@@ -1357,7 +1357,7 @@ err_unregister_i2c:
        return err;
 }
 
-static int anx78xx_i2c_remove(struct i2c_client *client)
+static void anx78xx_i2c_remove(struct i2c_client *client)
 {
        struct anx78xx *anx78xx = i2c_get_clientdata(client);
 
@@ -1366,8 +1366,6 @@ static int anx78xx_i2c_remove(struct i2c_client *client)
        unregister_i2c_dummy_clients(anx78xx);
 
        kfree(anx78xx->edid);
-
-       return 0;
 }
 
 static const struct i2c_device_id anx78xx_id[] = {
index d1f1d52..aecf6cf 100644 (file)
@@ -2689,7 +2689,7 @@ free_hdcp_wq:
        return ret;
 }
 
-static int anx7625_i2c_remove(struct i2c_client *client)
+static void anx7625_i2c_remove(struct i2c_client *client)
 {
        struct anx7625_data *platform = i2c_get_clientdata(client);
 
@@ -2709,8 +2709,6 @@ static int anx7625_i2c_remove(struct i2c_client *client)
 
        if (platform->pdata.audio_en)
                anx7625_unregister_audio(platform);
-
-       return 0;
 }
 
 static const struct i2c_device_id anx7625_id[] = {
index ba06027..b94f39a 100644 (file)
@@ -583,14 +583,12 @@ static int ch7033_probe(struct i2c_client *client,
        return 0;
 }
 
-static int ch7033_remove(struct i2c_client *client)
+static void ch7033_remove(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct ch7033_priv *priv = dev_get_drvdata(dev);
 
        drm_bridge_remove(&priv->bridge);
-
-       return 0;
 }
 
 static const struct of_device_id ch7033_dt_ids[] = {
index 0f6d907..fa91bde 100644 (file)
@@ -159,13 +159,11 @@ static int cros_ec_anx7688_bridge_probe(struct i2c_client *client)
        return 0;
 }
 
-static int cros_ec_anx7688_bridge_remove(struct i2c_client *client)
+static void cros_ec_anx7688_bridge_remove(struct i2c_client *client)
 {
        struct cros_ec_anx7688 *anx7688 = i2c_get_clientdata(client);
 
        drm_bridge_remove(&anx7688->bridge);
-
-       return 0;
 }
 
 static const struct of_device_id cros_ec_anx7688_bridge_match_table[] = {
index 4b673c4..547e0c9 100644 (file)
@@ -3316,7 +3316,7 @@ static int it6505_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int it6505_i2c_remove(struct i2c_client *client)
+static void it6505_i2c_remove(struct i2c_client *client)
 {
        struct it6505 *it6505 = i2c_get_clientdata(client);
 
@@ -3324,8 +3324,6 @@ static int it6505_i2c_remove(struct i2c_client *client)
        drm_dp_aux_unregister(&it6505->aux);
        it6505_debugfs_remove(it6505);
        it6505_poweroff(it6505);
-
-       return 0;
 }
 
 static const struct i2c_device_id it6505_id[] = {
index 44278d5..4f6f1de 100644 (file)
@@ -1623,15 +1623,13 @@ static int it66121_probe(struct i2c_client *client,
        return 0;
 }
 
-static int it66121_remove(struct i2c_client *client)
+static void it66121_remove(struct i2c_client *client)
 {
        struct it66121_ctx *ctx = i2c_get_clientdata(client);
 
        ite66121_power_off(ctx);
        drm_bridge_remove(&ctx->bridge);
        mutex_destroy(&ctx->lock);
-
-       return 0;
 }
 
 static const struct of_device_id it66121_dt_match[] = {
index 5968f4a..be533d2 100644 (file)
@@ -723,7 +723,7 @@ err_dt_parse:
        return ret;
 }
 
-static int lt8912_remove(struct i2c_client *client)
+static void lt8912_remove(struct i2c_client *client)
 {
        struct lt8912 *lt = i2c_get_clientdata(client);
 
@@ -731,7 +731,6 @@ static int lt8912_remove(struct i2c_client *client)
        drm_bridge_remove(&lt->bridge);
        lt8912_free_i2c(lt);
        lt8912_put_dt(lt);
-       return 0;
 }
 
 static const struct of_device_id lt8912_dt_match[] = {
index 9a3e904..933ca02 100644 (file)
@@ -766,13 +766,11 @@ static int lt9211_probe(struct i2c_client *client,
        return ret;
 }
 
-static int lt9211_remove(struct i2c_client *client)
+static void lt9211_remove(struct i2c_client *client)
 {
        struct lt9211 *ctx = i2c_get_clientdata(client);
 
        drm_bridge_remove(&ctx->bridge);
-
-       return 0;
 }
 
 static struct i2c_device_id lt9211_id[] = {
index 8a60e83..ddfbff3 100644 (file)
@@ -1216,7 +1216,7 @@ err_of_put:
        return ret;
 }
 
-static int lt9611_remove(struct i2c_client *client)
+static void lt9611_remove(struct i2c_client *client)
 {
        struct lt9611 *lt9611 = i2c_get_clientdata(client);
 
@@ -1228,8 +1228,6 @@ static int lt9611_remove(struct i2c_client *client)
 
        of_node_put(lt9611->dsi1_node);
        of_node_put(lt9611->dsi0_node);
-
-       return 0;
 }
 
 static struct i2c_device_id lt9611_id[] = {
index fdf12d4..fa1ee62 100644 (file)
@@ -978,7 +978,7 @@ err_of_put:
        return ret;
 }
 
-static int lt9611uxc_remove(struct i2c_client *client)
+static void lt9611uxc_remove(struct i2c_client *client)
 {
        struct lt9611uxc *lt9611uxc = i2c_get_clientdata(client);
 
@@ -993,8 +993,6 @@ static int lt9611uxc_remove(struct i2c_client *client)
 
        of_node_put(lt9611uxc->dsi1_node);
        of_node_put(lt9611uxc->dsi0_node);
-
-       return 0;
 }
 
 static struct i2c_device_id lt9611uxc_id[] = {
index cce98bf..9f175df 100644 (file)
@@ -355,11 +355,9 @@ static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c,
        return ge_b850v3_register();
 }
 
-static int stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c)
+static void stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c)
 {
        ge_b850v3_lvds_remove();
-
-       return 0;
 }
 
 static const struct i2c_device_id stdp4028_ge_b850v3_fw_i2c_table[] = {
@@ -405,11 +403,9 @@ static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c,
        return ge_b850v3_register();
 }
 
-static int stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c)
+static void stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c)
 {
        ge_b850v3_lvds_remove();
-
-       return 0;
 }
 
 static const struct i2c_device_id stdp2690_ge_b850v3_fw_i2c_table[] = {
index 1ab91f4..0851101 100644 (file)
@@ -315,13 +315,11 @@ static int ptn3460_probe(struct i2c_client *client,
        return 0;
 }
 
-static int ptn3460_remove(struct i2c_client *client)
+static void ptn3460_remove(struct i2c_client *client)
 {
        struct ptn3460_bridge *ptn_bridge = i2c_get_clientdata(client);
 
        drm_bridge_remove(&ptn_bridge->bridge);
-
-       return 0;
 }
 
 static const struct i2c_device_id ptn3460_i2c_table[] = {
index b5750e5..309de80 100644 (file)
@@ -520,14 +520,12 @@ static int ps8622_probe(struct i2c_client *client,
        return 0;
 }
 
-static int ps8622_remove(struct i2c_client *client)
+static void ps8622_remove(struct i2c_client *client)
 {
        struct ps8622_bridge *ps8622 = i2c_get_clientdata(client);
 
        backlight_device_unregister(ps8622->bl);
        drm_bridge_remove(&ps8622->bridge);
-
-       return 0;
 }
 
 static const struct i2c_device_id ps8622_i2c_table[] = {
index 7ab38d7..878fb7d 100644 (file)
@@ -1145,7 +1145,7 @@ static int sii902x_probe(struct i2c_client *client,
        return ret;
 }
 
-static int sii902x_remove(struct i2c_client *client)
+static void sii902x_remove(struct i2c_client *client)
 
 {
        struct sii902x *sii902x = i2c_get_clientdata(client);
@@ -1154,8 +1154,6 @@ static int sii902x_remove(struct i2c_client *client)
        drm_bridge_remove(&sii902x->bridge);
        regulator_bulk_disable(ARRAY_SIZE(sii902x->supplies),
                               sii902x->supplies);
-
-       return 0;
 }
 
 static const struct of_device_id sii902x_dt_ids[] = {
index 15c98a7..5b3061d 100644 (file)
@@ -936,14 +936,12 @@ static int sii9234_probe(struct i2c_client *client,
        return 0;
 }
 
-static int sii9234_remove(struct i2c_client *client)
+static void sii9234_remove(struct i2c_client *client)
 {
        struct sii9234 *ctx = i2c_get_clientdata(client);
 
        sii9234_cable_out(ctx);
        drm_bridge_remove(&ctx->bridge);
-
-       return 0;
 }
 
 static const struct of_device_id sii9234_dt_match[] = {
index ab0bce4..511982a 100644 (file)
@@ -2346,7 +2346,7 @@ static int sii8620_probe(struct i2c_client *client,
        return 0;
 }
 
-static int sii8620_remove(struct i2c_client *client)
+static void sii8620_remove(struct i2c_client *client)
 {
        struct sii8620 *ctx = i2c_get_clientdata(client);
 
@@ -2360,8 +2360,6 @@ static int sii8620_remove(struct i2c_client *client)
                sii8620_cable_out(ctx);
        }
        drm_bridge_remove(&ctx->bridge);
-
-       return 0;
 }
 
 static const struct of_device_id sii8620_dt_match[] = {
index 02bd757..695cf58 100644 (file)
@@ -2194,13 +2194,11 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return 0;
 }
 
-static int tc_remove(struct i2c_client *client)
+static void tc_remove(struct i2c_client *client)
 {
        struct tc_data *tc = i2c_get_clientdata(client);
 
        drm_bridge_remove(&tc->bridge);
-
-       return 0;
 }
 
 static const struct i2c_device_id tc358767_i2c_ids[] = {
index fd585bf..4c4b77c 100644 (file)
@@ -1072,13 +1072,11 @@ static int tc358768_i2c_probe(struct i2c_client *client,
        return mipi_dsi_host_register(&priv->dsi_host);
 }
 
-static int tc358768_i2c_remove(struct i2c_client *client)
+static void tc358768_i2c_remove(struct i2c_client *client)
 {
        struct tc358768_priv *priv = i2c_get_clientdata(client);
 
        mipi_dsi_host_unregister(&priv->dsi_host);
-
-       return 0;
 }
 
 static struct i2c_driver tc358768_driver = {
index f1c6e62..02dc12b 100644 (file)
@@ -704,13 +704,11 @@ err_bridge_remove:
        return ret;
 }
 
-static int tc_remove(struct i2c_client *client)
+static void tc_remove(struct i2c_client *client)
 {
        struct tc_data *tc = i2c_get_clientdata(client);
 
        drm_bridge_remove(&tc->bridge);
-
-       return 0;
 }
 
 static const struct i2c_device_id tc358775_i2c_ids[] = {
index cef4548..186a9e2 100644 (file)
@@ -379,14 +379,12 @@ err_remove_bridge:
        return ret;
 }
 
-static int dlpc3433_remove(struct i2c_client *client)
+static void dlpc3433_remove(struct i2c_client *client)
 {
        struct dlpc *dlpc = i2c_get_clientdata(client);
 
        drm_bridge_remove(&dlpc->bridge);
        of_node_put(dlpc->host_node);
-
-       return 0;
 }
 
 static const struct i2c_device_id dlpc3433_id[] = {
index 14e7aa7..7ba9467 100644 (file)
@@ -708,13 +708,11 @@ err_remove_bridge:
        return ret;
 }
 
-static int sn65dsi83_remove(struct i2c_client *client)
+static void sn65dsi83_remove(struct i2c_client *client)
 {
        struct sn65dsi83 *ctx = i2c_get_clientdata(client);
 
        drm_bridge_remove(&ctx->bridge);
-
-       return 0;
 }
 
 static struct i2c_device_id sn65dsi83_id[] = {
index 401fe61..b9635ab 100644 (file)
@@ -394,11 +394,9 @@ static int tfp410_i2c_probe(struct i2c_client *client,
        return tfp410_init(&client->dev, true);
 }
 
-static int tfp410_i2c_remove(struct i2c_client *client)
+static void tfp410_i2c_remove(struct i2c_client *client)
 {
        tfp410_fini(&client->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id tfp410_i2c_ids[] = {
index b91e48d..578b738 100644 (file)
@@ -417,11 +417,9 @@ fail:
        return -ENODEV;
 }
 
-static int ch7006_remove(struct i2c_client *client)
+static void ch7006_remove(struct i2c_client *client)
 {
        ch7006_dbg(client, "\n");
-
-       return 0;
 }
 
 static int ch7006_resume(struct device *dev)
index 741886b..1bc0b5d 100644 (file)
@@ -370,12 +370,6 @@ sil164_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return 0;
 }
 
-static int
-sil164_remove(struct i2c_client *client)
-{
-       return 0;
-}
-
 static struct i2c_client *
 sil164_detect_slave(struct i2c_client *client)
 {
@@ -427,7 +421,6 @@ MODULE_DEVICE_TABLE(i2c, sil164_ids);
 static struct drm_i2c_encoder_driver sil164_driver = {
        .i2c_driver = {
                .probe = sil164_probe,
-               .remove = sil164_remove,
                .driver = {
                        .name = "sil164",
                },
index 5b03fdd..9ed54e7 100644 (file)
@@ -478,14 +478,12 @@ static int tda9950_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tda9950_remove(struct i2c_client *client)
+static void tda9950_remove(struct i2c_client *client)
 {
        struct tda9950_priv *priv = i2c_get_clientdata(client);
 
        cec_notifier_cec_adap_unregister(priv->notify, priv->adap);
        cec_unregister_adapter(priv->adap);
-
-       return 0;
 }
 
 static struct i2c_device_id tda9950_ids[] = {
index f8eb6f6..d444e7f 100644 (file)
@@ -2076,11 +2076,10 @@ tda998x_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return ret;
 }
 
-static int tda998x_remove(struct i2c_client *client)
+static void tda998x_remove(struct i2c_client *client)
 {
        component_del(&client->dev, &tda998x_ops);
        tda998x_destroy(&client->dev);
-       return 0;
 }
 
 #ifdef CONFIG_OF
index cb5cb27..36a46cb 100644 (file)
@@ -288,7 +288,7 @@ static int lcd_olinuxino_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lcd_olinuxino_remove(struct i2c_client *client)
+static void lcd_olinuxino_remove(struct i2c_client *client)
 {
        struct lcd_olinuxino *panel = i2c_get_clientdata(client);
 
@@ -296,8 +296,6 @@ static int lcd_olinuxino_remove(struct i2c_client *client)
 
        drm_panel_disable(&panel->panel);
        drm_panel_unprepare(&panel->panel);
-
-       return 0;
 }
 
 static const struct of_device_id lcd_olinuxino_of_ids[] = {
index a6dc5ab..79f8524 100644 (file)
@@ -446,7 +446,7 @@ error:
        return -ENODEV;
 }
 
-static int rpi_touchscreen_remove(struct i2c_client *i2c)
+static void rpi_touchscreen_remove(struct i2c_client *i2c)
 {
        struct rpi_touchscreen *ts = i2c_get_clientdata(i2c);
 
@@ -455,8 +455,6 @@ static int rpi_touchscreen_remove(struct i2c_client *i2c)
        drm_panel_remove(&ts->base);
 
        mipi_dsi_device_unregister(ts->dsi);
-
-       return 0;
 }
 
 static int rpi_touchscreen_dsi_probe(struct mipi_dsi_device *dsi)
index 1e0fcec..ddfa0bb 100644 (file)
@@ -39,13 +39,11 @@ static int ssd130x_i2c_probe(struct i2c_client *client)
        return 0;
 }
 
-static int ssd130x_i2c_remove(struct i2c_client *client)
+static void ssd130x_i2c_remove(struct i2c_client *client)
 {
        struct ssd130x_device *ssd130x = i2c_get_clientdata(client);
 
        ssd130x_remove(ssd130x);
-
-       return 0;
 }
 
 static void ssd130x_i2c_shutdown(struct i2c_client *client)
index c078f09..95cefae 100644 (file)
@@ -1064,7 +1064,7 @@ err_powered:
 }
 EXPORT_SYMBOL_GPL(i2c_hid_core_probe);
 
-int i2c_hid_core_remove(struct i2c_client *client)
+void i2c_hid_core_remove(struct i2c_client *client)
 {
        struct i2c_hid *ihid = i2c_get_clientdata(client);
        struct hid_device *hid;
@@ -1078,8 +1078,6 @@ int i2c_hid_core_remove(struct i2c_client *client)
                i2c_hid_free_buffers(ihid);
 
        i2c_hid_core_power_down(ihid);
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(i2c_hid_core_remove);
 
index 236cc06..96c7551 100644 (file)
@@ -33,7 +33,7 @@ struct i2chid_ops {
 
 int i2c_hid_core_probe(struct i2c_client *client, struct i2chid_ops *ops,
                       u16 hid_descriptor_address, u32 quirks);
-int i2c_hid_core_remove(struct i2c_client *client);
+void i2c_hid_core_remove(struct i2c_client *client);
 
 void i2c_hid_core_shutdown(struct i2c_client *client);
 
index fd938c7..2991605 100644 (file)
@@ -495,14 +495,12 @@ error:
        return err;
 }
 
-static int adc128_remove(struct i2c_client *client)
+static void adc128_remove(struct i2c_client *client)
 {
        struct adc128_data *data = i2c_get_clientdata(client);
 
        if (data->regulator)
                regulator_disable(data->regulator);
-
-       return 0;
 }
 
 static const struct i2c_device_id adc128_id[] = {
index c67cd03..927f8df 100644 (file)
@@ -1296,12 +1296,11 @@ static int adt7470_probe(struct i2c_client *client)
        return 0;
 }
 
-static int adt7470_remove(struct i2c_client *client)
+static void adt7470_remove(struct i2c_client *client)
 {
        struct adt7470_data *data = i2c_get_clientdata(client);
 
        kthread_stop(data->auto_update);
-       return 0;
 }
 
 static const struct i2c_device_id adt7470_id[] = {
index 8cf0bcb..a9166c8 100644 (file)
@@ -208,7 +208,7 @@ static void asb100_write_value(struct i2c_client *client, u16 reg, u16 val);
 static int asb100_probe(struct i2c_client *client);
 static int asb100_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
-static int asb100_remove(struct i2c_client *client);
+static void asb100_remove(struct i2c_client *client);
 static struct asb100_data *asb100_update_device(struct device *dev);
 static void asb100_init_client(struct i2c_client *client);
 
@@ -822,7 +822,7 @@ ERROR3:
        return err;
 }
 
-static int asb100_remove(struct i2c_client *client)
+static void asb100_remove(struct i2c_client *client)
 {
        struct asb100_data *data = i2c_get_clientdata(client);
 
@@ -831,8 +831,6 @@ static int asb100_remove(struct i2c_client *client)
 
        i2c_unregister_device(data->lm75[1]);
        i2c_unregister_device(data->lm75[0]);
-
-       return 0;
 }
 
 /*
index e835605..4f90fde 100644 (file)
@@ -1165,7 +1165,7 @@ static int asc7621_detect(struct i2c_client *client,
        return -ENODEV;
 }
 
-static int asc7621_remove(struct i2c_client *client)
+static void asc7621_remove(struct i2c_client *client)
 {
        struct asc7621_data *data = i2c_get_clientdata(client);
        int i;
@@ -1176,8 +1176,6 @@ static int asc7621_remove(struct i2c_client *client)
                device_remove_file(&client->dev,
                                   &(asc7621_params[i].sda.dev_attr));
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id asc7621_id[] = {
index e3ad4c2..b1cd028 100644 (file)
@@ -2508,14 +2508,12 @@ exit_remove:
        return err;
 }
 
-static int dme1737_i2c_remove(struct i2c_client *client)
+static void dme1737_i2c_remove(struct i2c_client *client)
 {
        struct dme1737_data *data = i2c_get_clientdata(client);
 
        hwmon_device_unregister(data->hwmon_dev);
        dme1737_remove_files(&client->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id dme1737_id[] = {
index 57c8a47..ffeed6c 100644 (file)
@@ -114,7 +114,7 @@ struct f75375_data {
 static int f75375_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
 static int f75375_probe(struct i2c_client *client);
-static int f75375_remove(struct i2c_client *client);
+static void f75375_remove(struct i2c_client *client);
 
 static const struct i2c_device_id f75375_id[] = {
        { "f75373", f75373 },
@@ -864,12 +864,11 @@ exit_remove:
        return err;
 }
 
-static int f75375_remove(struct i2c_client *client)
+static void f75375_remove(struct i2c_client *client)
 {
        struct f75375_data *data = i2c_get_clientdata(client);
        hwmon_device_unregister(data->hwmon_dev);
        sysfs_remove_group(&client->dev.kobj, &f75375_group);
-       return 0;
 }
 
 /* Return 0 if detection is successful, -ENODEV otherwise */
index c26195e..343e227 100644 (file)
@@ -217,7 +217,7 @@ static const int FSCHMD_NO_TEMP_SENSORS[7] = { 3, 3, 4, 3, 5, 5, 11 };
 static int fschmd_probe(struct i2c_client *client);
 static int fschmd_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
-static int fschmd_remove(struct i2c_client *client);
+static void fschmd_remove(struct i2c_client *client);
 static struct fschmd_data *fschmd_update_device(struct device *dev);
 
 /*
@@ -1248,7 +1248,7 @@ exit_detach:
        return err;
 }
 
-static int fschmd_remove(struct i2c_client *client)
+static void fschmd_remove(struct i2c_client *client)
 {
        struct fschmd_data *data = i2c_get_clientdata(client);
        int i;
@@ -1291,8 +1291,6 @@ static int fschmd_remove(struct i2c_client *client)
        mutex_lock(&watchdog_data_mutex);
        kref_put(&data->kref, fschmd_release_resources);
        mutex_unlock(&watchdog_data_mutex);
-
-       return 0;
 }
 
 static struct fschmd_data *fschmd_update_device(struct device *dev)
index ceffc76..9187638 100644 (file)
@@ -744,12 +744,11 @@ static int fts_detect(struct i2c_client *client,
        return 0;
 }
 
-static int fts_remove(struct i2c_client *client)
+static void fts_remove(struct i2c_client *client)
 {
        struct fts_data *data = dev_get_drvdata(&client->dev);
 
        watchdog_unregister_device(&data->wdd);
-       return 0;
 }
 
 static int fts_probe(struct i2c_client *client)
index fc3007c..9b58655 100644 (file)
@@ -568,13 +568,11 @@ out_restore_conf:
        return ret;
 }
 
-static int ina209_remove(struct i2c_client *client)
+static void ina209_remove(struct i2c_client *client)
 {
        struct ina209_data *data = i2c_get_clientdata(client);
 
        ina209_restore_conf(client, data);
-
-       return 0;
 }
 
 static const struct i2c_device_id ina209_id[] = {
index 58d3828..f89bac1 100644 (file)
@@ -913,7 +913,7 @@ fail:
        return ret;
 }
 
-static int ina3221_remove(struct i2c_client *client)
+static void ina3221_remove(struct i2c_client *client)
 {
        struct ina3221_data *ina = dev_get_drvdata(&client->dev);
        int i;
@@ -926,8 +926,6 @@ static int ina3221_remove(struct i2c_client *client)
                pm_runtime_put_noidle(ina->pm_dev);
 
        mutex_destroy(&ina->lock);
-
-       return 0;
 }
 
 static int __maybe_unused ina3221_suspend(struct device *dev)
index 07f7f8b..7b3c190 100644 (file)
@@ -524,7 +524,7 @@ static int jc42_probe(struct i2c_client *client)
        return PTR_ERR_OR_ZERO(hwmon_dev);
 }
 
-static int jc42_remove(struct i2c_client *client)
+static void jc42_remove(struct i2c_client *client)
 {
        struct jc42_data *data = i2c_get_clientdata(client);
 
@@ -537,7 +537,6 @@ static int jc42_remove(struct i2c_client *client)
                  | (data->config & JC42_CFG_HYST_MASK);
                i2c_smbus_write_word_swapped(client, JC42_REG_CONFIG, config);
        }
-       return 0;
 }
 
 #ifdef CONFIG_PM
index b221be1..9e1744f 100644 (file)
@@ -227,13 +227,11 @@ static int p8_i2c_occ_probe(struct i2c_client *client)
        return occ_setup(occ);
 }
 
-static int p8_i2c_occ_remove(struct i2c_client *client)
+static void p8_i2c_occ_remove(struct i2c_client *client)
 {
        struct occ *occ = dev_get_drvdata(&client->dev);
 
        occ_shutdown(occ);
-
-       return 0;
 }
 
 static const struct of_device_id p8_i2c_occ_of_match[] = {
index a97a510..af9614e 100644 (file)
@@ -228,14 +228,13 @@ exit_sysfs_remove:
        return err;
 }
 
-static int pcf8591_remove(struct i2c_client *client)
+static void pcf8591_remove(struct i2c_client *client)
 {
        struct pcf8591_data *data = i2c_get_clientdata(client);
 
        hwmon_device_unregister(data->hwmon_dev);
        sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group_opt);
        sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group);
-       return 0;
 }
 
 /* Called when we have found a new PCF8591. */
index 8c4ed72..c36bdbe 100644 (file)
@@ -671,12 +671,11 @@ out_unregister:
        return ret;
 }
 
-static int smm665_remove(struct i2c_client *client)
+static void smm665_remove(struct i2c_client *client)
 {
        struct smm665_data *data = i2c_get_clientdata(client);
 
        i2c_unregister_device(data->cmdreg);
-       return 0;
 }
 
 static const struct i2c_device_id smm665_id[] = {
index f7c59ff..5e3fc22 100644 (file)
@@ -590,13 +590,11 @@ static int tps23861_probe(struct i2c_client *client)
        return 0;
 }
 
-static int tps23861_remove(struct i2c_client *client)
+static void tps23861_remove(struct i2c_client *client)
 {
        struct tps23861_data *data = i2c_get_clientdata(client);
 
        debugfs_remove_recursive(data->debugfs_dir);
-
-       return 0;
 }
 
 static const struct of_device_id __maybe_unused tps23861_of_match[] = {
index b357972..55c78e1 100644 (file)
@@ -1239,7 +1239,7 @@ static int w83781d_probe(struct i2c_client *client)
        return err;
 }
 
-static int
+static void
 w83781d_remove(struct i2c_client *client)
 {
        struct w83781d_data *data = i2c_get_clientdata(client);
@@ -1250,8 +1250,6 @@ w83781d_remove(struct i2c_client *client)
 
        i2c_unregister_device(data->lm75[0]);
        i2c_unregister_device(data->lm75[1]);
-
-       return 0;
 }
 
 static int
index 80a9a78..5fe5c93 100644 (file)
@@ -315,7 +315,7 @@ struct w83791d_data {
 static int w83791d_probe(struct i2c_client *client);
 static int w83791d_detect(struct i2c_client *client,
                          struct i2c_board_info *info);
-static int w83791d_remove(struct i2c_client *client);
+static void w83791d_remove(struct i2c_client *client);
 
 static int w83791d_read(struct i2c_client *client, u8 reg);
 static int w83791d_write(struct i2c_client *client, u8 reg, u8 value);
@@ -1405,14 +1405,12 @@ error4:
        return err;
 }
 
-static int w83791d_remove(struct i2c_client *client)
+static void w83791d_remove(struct i2c_client *client)
 {
        struct w83791d_data *data = i2c_get_clientdata(client);
 
        hwmon_device_unregister(data->hwmon_dev);
        sysfs_remove_group(&client->dev.kobj, &w83791d_group);
-
-       return 0;
 }
 
 static void w83791d_init_client(struct i2c_client *client)
index 31a1cdc..2ee8ee4 100644 (file)
@@ -286,7 +286,7 @@ struct w83792d_data {
 static int w83792d_probe(struct i2c_client *client);
 static int w83792d_detect(struct i2c_client *client,
                          struct i2c_board_info *info);
-static int w83792d_remove(struct i2c_client *client);
+static void w83792d_remove(struct i2c_client *client);
 static struct w83792d_data *w83792d_update_device(struct device *dev);
 
 #ifdef DEBUG
@@ -1429,7 +1429,7 @@ exit_remove_files:
        return err;
 }
 
-static int
+static void
 w83792d_remove(struct i2c_client *client)
 {
        struct w83792d_data *data = i2c_get_clientdata(client);
@@ -1440,8 +1440,6 @@ w83792d_remove(struct i2c_client *client)
        for (i = 0; i < ARRAY_SIZE(w83792d_group_fan); i++)
                sysfs_remove_group(&client->dev.kobj,
                                   &w83792d_group_fan[i]);
-
-       return 0;
 }
 
 static void
index 0a65d16..daeaade 100644 (file)
@@ -285,7 +285,7 @@ static int w83793_write_value(struct i2c_client *client, u16 reg, u8 value);
 static int w83793_probe(struct i2c_client *client);
 static int w83793_detect(struct i2c_client *client,
                         struct i2c_board_info *info);
-static int w83793_remove(struct i2c_client *client);
+static void w83793_remove(struct i2c_client *client);
 static void w83793_init_client(struct i2c_client *client);
 static void w83793_update_nonvolatile(struct device *dev);
 static struct w83793_data *w83793_update_device(struct device *dev);
@@ -1495,7 +1495,7 @@ static struct notifier_block watchdog_notifier = {
  * Init / remove routines
  */
 
-static int w83793_remove(struct i2c_client *client)
+static void w83793_remove(struct i2c_client *client)
 {
        struct w83793_data *data = i2c_get_clientdata(client);
        struct device *dev = &client->dev;
@@ -1554,8 +1554,6 @@ static int w83793_remove(struct i2c_client *client)
        mutex_lock(&watchdog_data_mutex);
        kref_put(&data->kref, w83793_release_resources);
        mutex_unlock(&watchdog_data_mutex);
-
-       return 0;
 }
 
 static int
index 45b12c4..b170cdf 100644 (file)
@@ -2235,14 +2235,12 @@ exit_remove:
        return err;
 }
 
-static int w83795_remove(struct i2c_client *client)
+static void w83795_remove(struct i2c_client *client)
 {
        struct w83795_data *data = i2c_get_clientdata(client);
 
        hwmon_device_unregister(data->hwmon_dev);
        w83795_handle_files(&client->dev, device_remove_file_wrapper);
-
-       return 0;
 }
 
 
index a41f989..99f6835 100644 (file)
@@ -65,7 +65,7 @@ static const unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END };
 static int w83l785ts_probe(struct i2c_client *client);
 static int w83l785ts_detect(struct i2c_client *client,
                            struct i2c_board_info *info);
-static int w83l785ts_remove(struct i2c_client *client);
+static void w83l785ts_remove(struct i2c_client *client);
 static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval);
 static struct w83l785ts_data *w83l785ts_update_device(struct device *dev);
 
@@ -203,7 +203,7 @@ exit_remove:
        return err;
 }
 
-static int w83l785ts_remove(struct i2c_client *client)
+static void w83l785ts_remove(struct i2c_client *client)
 {
        struct w83l785ts_data *data = i2c_get_clientdata(client);
 
@@ -212,8 +212,6 @@ static int w83l785ts_remove(struct i2c_client *client)
                           &sensor_dev_attr_temp1_input.dev_attr);
        device_remove_file(&client->dev,
                           &sensor_dev_attr_temp1_max.dev_attr);
-
-       return 0;
 }
 
 static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval)
index 7284206..a8b873b 100644 (file)
@@ -1267,6 +1267,16 @@ config I2C_PARPORT
          This support is also available as a module.  If so, the module
          will be called i2c-parport.
 
+config I2C_PCI1XXXX
+       tristate "PCI1XXXX I2C Host Adapter"
+       depends on PCI
+       help
+         If you say yes to this option, support will be included for
+         Microchip PCI1XXXX's I2C interface.
+
+         This driver can also be built as a module. If so, the module will
+         be called i2c-mchp-pci1xxxx.
+
 config I2C_ROBOTFUZZ_OSIF
        tristate "RobotFuzz Open Source InterFace USB adapter"
        depends on USB
index c5cac15..e73cdb1 100644 (file)
@@ -133,6 +133,7 @@ obj-$(CONFIG_I2C_DIOLAN_U2C)        += i2c-diolan-u2c.o
 obj-$(CONFIG_I2C_DLN2)         += i2c-dln2.o
 obj-$(CONFIG_I2C_CP2615) += i2c-cp2615.o
 obj-$(CONFIG_I2C_PARPORT)      += i2c-parport.o
+obj-$(CONFIG_I2C_PCI1XXXX)     += i2c-mchp-pci1xxxx.o
 obj-$(CONFIG_I2C_ROBOTFUZZ_OSIF)       += i2c-robotfuzz-osif.o
 obj-$(CONFIG_I2C_TAOS_EVM)     += i2c-taos-evm.o
 obj-$(CONFIG_I2C_TINY_USB)     += i2c-tiny-usb.o
index 33f5588..fe0cd20 100644 (file)
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
+#include <linux/iopoll.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
 #include <linux/pm_runtime.h>
+#include <linux/pinctrl/consumer.h>
 
 /* Register offsets for the I2C device. */
 #define CDNS_I2C_CR_OFFSET             0x00 /* Control Register, RW */
 #define CDNS_I2C_TIMEOUT_MAX   0xFF
 
 #define CDNS_I2C_BROKEN_HOLD_BIT       BIT(0)
+#define CDNS_I2C_POLL_US       100000
+#define CDNS_I2C_TIMEOUT_US    500000
 
 #define cdns_i2c_readreg(offset)       readl_relaxed(id->membase + offset)
 #define cdns_i2c_writereg(val, offset) writel_relaxed(val, id->membase + offset)
@@ -204,6 +208,7 @@ struct cdns_i2c {
        struct notifier_block clk_rate_change_nb;
        u32 quirks;
        u32 ctrl_reg;
+       struct i2c_bus_recovery_info rinfo;
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
        u16 ctrl_reg_diva_divb;
        struct i2c_client *slave;
@@ -840,8 +845,14 @@ static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 #endif
 
        /* Check if the bus is free */
-       if (cdns_i2c_readreg(CDNS_I2C_SR_OFFSET) & CDNS_I2C_SR_BA) {
+
+       ret = readl_relaxed_poll_timeout(id->membase + CDNS_I2C_SR_OFFSET,
+                                        reg,
+                                        !(reg & CDNS_I2C_SR_BA),
+                                        CDNS_I2C_POLL_US, CDNS_I2C_TIMEOUT_US);
+       if (ret) {
                ret = -EAGAIN;
+               i2c_recover_bus(adap);
                goto out;
        }
 
@@ -1250,6 +1261,12 @@ static int cdns_i2c_probe(struct platform_device *pdev)
                id->quirks = data->quirks;
        }
 
+       id->rinfo.pinctrl = devm_pinctrl_get(&pdev->dev);
+       if (IS_ERR(id->rinfo.pinctrl)) {
+               dev_info(&pdev->dev, "can't get pinctrl, bus recovery not supported\n");
+               return PTR_ERR(id->rinfo.pinctrl);
+       }
+
        id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
        if (IS_ERR(id->membase))
                return PTR_ERR(id->membase);
@@ -1266,6 +1283,7 @@ static int cdns_i2c_probe(struct platform_device *pdev)
        id->adap.retries = 3;           /* Default retry value. */
        id->adap.algo_data = id;
        id->adap.dev.parent = &pdev->dev;
+       id->adap.bus_recovery_info = &id->rinfo;
        init_completion(&id->xfer_done);
        snprintf(id->adap.name, sizeof(id->adap.name),
                 "Cadence I2C at %08lx", (unsigned long)r_mem->start);
index b624356..8f36167 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/psp-sev.h>
 #include <linux/types.h>
+#include <linux/workqueue.h>
 
 #include <asm/msr.h>
 
@@ -15,6 +16,8 @@
 #define PSP_MBOX_OFFSET                0x10570
 #define PSP_CMD_TIMEOUT_US     (500 * USEC_PER_MSEC)
 
+#define PSP_I2C_RESERVATION_TIME_MS 100
+
 #define PSP_I2C_REQ_BUS_CMD            0x64
 #define PSP_I2C_REQ_RETRY_CNT          400
 #define PSP_I2C_REQ_RETRY_DELAY_US     (25 * USEC_PER_MSEC)
@@ -240,6 +243,41 @@ cleanup:
        return ret;
 }
 
+static void release_bus(void)
+{
+       int status;
+
+       if (!psp_i2c_sem_acquired)
+               return;
+
+       status = psp_send_i2c_req(PSP_I2C_REQ_RELEASE);
+       if (status)
+               return;
+
+       dev_dbg(psp_i2c_dev, "PSP semaphore held for %ums\n",
+               jiffies_to_msecs(jiffies - psp_i2c_sem_acquired));
+
+       psp_i2c_sem_acquired = 0;
+}
+
+static void psp_release_i2c_bus_deferred(struct work_struct *work)
+{
+       mutex_lock(&psp_i2c_access_mutex);
+
+       /*
+        * If there is any pending transaction, cannot release the bus here.
+        * psp_release_i2c_bus will take care of this later.
+        */
+       if (psp_i2c_access_count)
+               goto cleanup;
+
+       release_bus();
+
+cleanup:
+       mutex_unlock(&psp_i2c_access_mutex);
+}
+static DECLARE_DELAYED_WORK(release_queue, psp_release_i2c_bus_deferred);
+
 static int psp_acquire_i2c_bus(void)
 {
        int status;
@@ -250,21 +288,23 @@ static int psp_acquire_i2c_bus(void)
        if (psp_i2c_mbox_fail)
                goto cleanup;
 
+       psp_i2c_access_count++;
+
        /*
-        * Simply increment usage counter and return if PSP semaphore was
-        * already taken by kernel.
+        * No need to request bus arbitration once we are inside semaphore
+        * reservation period.
         */
-       if (psp_i2c_access_count) {
-               psp_i2c_access_count++;
+       if (psp_i2c_sem_acquired)
                goto cleanup;
-       }
 
        status = psp_send_i2c_req(PSP_I2C_REQ_ACQUIRE);
        if (status)
                goto cleanup;
 
        psp_i2c_sem_acquired = jiffies;
-       psp_i2c_access_count++;
+
+       schedule_delayed_work(&release_queue,
+                             msecs_to_jiffies(PSP_I2C_RESERVATION_TIME_MS));
 
        /*
         * In case of errors with PSP arbitrator psp_i2c_mbox_fail variable is
@@ -279,8 +319,6 @@ cleanup:
 
 static void psp_release_i2c_bus(void)
 {
-       int status;
-
        mutex_lock(&psp_i2c_access_mutex);
 
        /* Return early if mailbox was malfunctional */
@@ -295,13 +333,12 @@ static void psp_release_i2c_bus(void)
        if (psp_i2c_access_count)
                goto cleanup;
 
-       /* Send a release command to PSP */
-       status = psp_send_i2c_req(PSP_I2C_REQ_RELEASE);
-       if (status)
-               goto cleanup;
-
-       dev_dbg(psp_i2c_dev, "PSP semaphore held for %ums\n",
-               jiffies_to_msecs(jiffies - psp_i2c_sem_acquired));
+       /*
+        * Send a release command to PSP if the semaphore reservation timeout
+        * elapsed but x86 still owns the controller.
+        */
+       if (!delayed_work_pending(&release_queue))
+               release_bus();
 
 cleanup:
        mutex_unlock(&psp_i2c_access_mutex);
index 608e612..e499f96 100644 (file)
@@ -27,7 +27,6 @@
 #include "i2c-ccgx-ucsi.h"
 
 #define DRIVER_NAME "i2c-designware-pci"
-#define AMD_CLK_RATE_HZ        100000
 
 enum dw_pci_ctl_id_t {
        medfield,
@@ -100,11 +99,6 @@ static u32 mfld_get_clk_rate_khz(struct dw_i2c_dev *dev)
        return 25000;
 }
 
-static u32 navi_amd_get_clk_rate_khz(struct dw_i2c_dev *dev)
-{
-       return AMD_CLK_RATE_HZ;
-}
-
 static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
 {
        struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev);
@@ -126,15 +120,6 @@ static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
        return -ENODEV;
 }
 
-static int navi_amd_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
-{
-       struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev);
-
-       dev->flags |= MODEL_AMD_NAVI_GPU;
-       dev->timings.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ;
-       return 0;
-}
-
 static int mrfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
 {
        /*
@@ -159,6 +144,20 @@ static u32 ehl_get_clk_rate_khz(struct dw_i2c_dev *dev)
        return 100000;
 }
 
+static u32 navi_amd_get_clk_rate_khz(struct dw_i2c_dev *dev)
+{
+       return 100000;
+}
+
+static int navi_amd_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
+{
+       struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev);
+
+       dev->flags |= MODEL_AMD_NAVI_GPU;
+       dev->timings.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ;
+       return 0;
+}
+
 static struct dw_pci_controller dw_pci_controllers[] = {
        [medfield] = {
                .bus_num = -1,
@@ -243,6 +242,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
        int r;
        struct dw_pci_controller *controller;
        struct dw_scl_sda_cfg *cfg;
+       struct i2c_timings *t;
 
        if (id->driver_data >= ARRAY_SIZE(dw_pci_controllers))
                return dev_err_probe(&pdev->dev, -EINVAL,
@@ -263,7 +263,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
                return dev_err_probe(&pdev->dev, r,
                                     "I/O memory remapping failed\n");
 
-       dev = devm_kzalloc(&pdev->dev, sizeof(struct dw_i2c_dev), GFP_KERNEL);
+       dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
        if (!dev)
                return -ENOMEM;
 
@@ -272,12 +272,14 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
                return r;
 
        dev->get_clk_rate_khz = controller->get_clk_rate_khz;
-       dev->timings.bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
        dev->base = pcim_iomap_table(pdev)[0];
        dev->dev = &pdev->dev;
        dev->irq = pci_irq_vector(pdev, 0);
        dev->flags |= controller->flags;
 
+       t = &dev->timings;
+       i2c_parse_fw_timings(&pdev->dev, t, false);
+
        pci_set_drvdata(pdev, dev);
 
        if (controller->setup) {
@@ -389,6 +391,7 @@ static const struct pci_device_id i2_designware_pci_ids[] = {
        { PCI_VDEVICE(INTEL, 0x4bbe), elkhartlake },
        { PCI_VDEVICE(INTEL, 0x4bbf), elkhartlake },
        { PCI_VDEVICE(INTEL, 0x4bc0), elkhartlake },
+       /* AMD NAVI */
        { PCI_VDEVICE(ATI,  0x7314), navi_amd },
        { PCI_VDEVICE(ATI,  0x73a4), navi_amd },
        { PCI_VDEVICE(ATI,  0x73e4), navi_amd },
index a176296..e06509e 100644 (file)
@@ -1838,6 +1838,7 @@ static struct pci_driver i801_driver = {
        .shutdown       = i801_shutdown,
        .driver         = {
                .pm     = &i801_pm_ops,
+               .probe_type = PROBE_PREFER_ASYNCHRONOUS,
        },
 };
 
index b51ab3c..188f2a3 100644 (file)
@@ -94,7 +94,8 @@ enum lpi2c_imx_pincfg {
 
 struct lpi2c_imx_struct {
        struct i2c_adapter      adapter;
-       struct clk              *clk;
+       int                     num_clks;
+       struct clk_bulk_data    *clks;
        void __iomem            *base;
        __u8                    *rx_buf;
        __u8                    *tx_buf;
@@ -207,7 +208,7 @@ static int lpi2c_imx_config(struct lpi2c_imx_struct *lpi2c_imx)
 
        lpi2c_imx_set_mode(lpi2c_imx);
 
-       clk_rate = clk_get_rate(lpi2c_imx->clk);
+       clk_rate = clk_get_rate(lpi2c_imx->clks[0].clk);
        if (lpi2c_imx->mode == HS || lpi2c_imx->mode == ULTRA_FAST)
                filt = 0;
        else
@@ -561,11 +562,12 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
        strscpy(lpi2c_imx->adapter.name, pdev->name,
                sizeof(lpi2c_imx->adapter.name));
 
-       lpi2c_imx->clk = devm_clk_get(&pdev->dev, NULL);
-       if (IS_ERR(lpi2c_imx->clk)) {
-               dev_err(&pdev->dev, "can't get I2C peripheral clock\n");
-               return PTR_ERR(lpi2c_imx->clk);
+       ret = devm_clk_bulk_get_all(&pdev->dev, &lpi2c_imx->clks);
+       if (ret < 0) {
+               dev_err(&pdev->dev, "can't get I2C peripheral clock, ret=%d\n", ret);
+               return ret;
        }
+       lpi2c_imx->num_clks = ret;
 
        ret = of_property_read_u32(pdev->dev.of_node,
                                   "clock-frequency", &lpi2c_imx->bitrate);
@@ -582,11 +584,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
        i2c_set_adapdata(&lpi2c_imx->adapter, lpi2c_imx);
        platform_set_drvdata(pdev, lpi2c_imx);
 
-       ret = clk_prepare_enable(lpi2c_imx->clk);
-       if (ret) {
-               dev_err(&pdev->dev, "clk enable failed %d\n", ret);
+       ret = clk_bulk_prepare_enable(lpi2c_imx->num_clks, lpi2c_imx->clks);
+       if (ret)
                return ret;
-       }
 
        pm_runtime_set_autosuspend_delay(&pdev->dev, I2C_PM_TIMEOUT);
        pm_runtime_use_autosuspend(&pdev->dev);
@@ -633,7 +633,7 @@ static int __maybe_unused lpi2c_runtime_suspend(struct device *dev)
 {
        struct lpi2c_imx_struct *lpi2c_imx = dev_get_drvdata(dev);
 
-       clk_disable_unprepare(lpi2c_imx->clk);
+       clk_bulk_disable_unprepare(lpi2c_imx->num_clks, lpi2c_imx->clks);
        pinctrl_pm_select_sleep_state(dev);
 
        return 0;
@@ -645,7 +645,7 @@ static int __maybe_unused lpi2c_runtime_resume(struct device *dev)
        int ret;
 
        pinctrl_pm_select_default_state(dev);
-       ret = clk_prepare_enable(lpi2c_imx->clk);
+       ret = clk_bulk_prepare_enable(lpi2c_imx->num_clks, lpi2c_imx->clks);
        if (ret) {
                dev_err(dev, "failed to enable I2C clock, ret=%d\n", ret);
                return ret;
index 6078fa0..fe23495 100644 (file)
@@ -937,11 +937,8 @@ ismt_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
        err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
        if (err) {
-               err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
-               if (err) {
-                       dev_err(&pdev->dev, "dma_set_mask fail\n");
-                       return -ENODEV;
-               }
+               dev_err(&pdev->dev, "dma_set_mask fail\n");
+               return -ENODEV;
        }
 
        err = ismt_dev_init(priv);
diff --git a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
new file mode 100644 (file)
index 0000000..f534220
--- /dev/null
@@ -0,0 +1,1210 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Microchip PCI1XXXX I2C adapter driver for PCIe Switch
+ * which has I2C controller in one of its downstream functions
+ *
+ * Copyright (C) 2021 - 2022 Microchip Technology Inc.
+ *
+ * Authors: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com>
+ *          Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>
+ */
+
+#include <linux/bits.h>
+#include <linux/delay.h>
+#include <linux/i2c.h>
+#include <linux/i2c-smbus.h>
+#include <linux/interrupt.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/types.h>
+
+#define SMBUS_MAST_CORE_ADDR_BASE              0x00000
+#define SMBUS_MAST_SYS_REG_ADDR_BASE           0x01000
+
+/* SMB register space. */
+#define SMB_CORE_CTRL_REG_OFF  (SMBUS_MAST_CORE_ADDR_BASE + 0x00)
+
+#define SMB_CORE_CTRL_ESO              BIT(6)
+#define SMB_CORE_CTRL_FW_ACK           BIT(4)
+#define SMB_CORE_CTRL_ACK              BIT(0)
+
+#define SMB_CORE_CMD_REG_OFF3  (SMBUS_MAST_CORE_ADDR_BASE + 0x0F)
+#define SMB_CORE_CMD_REG_OFF2  (SMBUS_MAST_CORE_ADDR_BASE + 0x0E)
+#define SMB_CORE_CMD_REG_OFF1  (SMBUS_MAST_CORE_ADDR_BASE + 0x0D)
+
+#define SMB_CORE_CMD_READM             BIT(4)
+#define SMB_CORE_CMD_STOP              BIT(2)
+#define SMB_CORE_CMD_START             BIT(0)
+
+#define SMB_CORE_CMD_REG_OFF0  (SMBUS_MAST_CORE_ADDR_BASE + 0x0C)
+
+#define SMB_CORE_CMD_M_PROCEED         BIT(1)
+#define SMB_CORE_CMD_M_RUN             BIT(0)
+
+#define SMB_CORE_SR_HOLD_TIME_REG_OFF  (SMBUS_MAST_CORE_ADDR_BASE + 0x18)
+
+/*
+ * SR_HOLD_TIME_XK_TICKS field will indicate the number of ticks of the
+ * baud clock required to program 'Hold Time' at X KHz.
+ */
+#define SR_HOLD_TIME_100K_TICKS        133
+#define SR_HOLD_TIME_400K_TICKS        20
+#define SR_HOLD_TIME_1000K_TICKS       11
+
+#define SMB_CORE_COMPLETION_REG_OFF3   (SMBUS_MAST_CORE_ADDR_BASE + 0x23)
+
+#define COMPLETION_MDONE               BIT(6)
+#define COMPLETION_IDLE                        BIT(5)
+#define COMPLETION_MNAKX               BIT(0)
+
+#define SMB_CORE_IDLE_SCALING_REG_OFF  (SMBUS_MAST_CORE_ADDR_BASE + 0x24)
+
+/*
+ * FAIR_BUS_IDLE_MIN_XK_TICKS field will indicate the number of ticks of
+ * the baud clock required to program 'fair idle delay' at X KHz. Fair idle
+ * delay establishes the MCTP T(IDLE_DELAY) period.
+ */
+#define FAIR_BUS_IDLE_MIN_100K_TICKS           969
+#define FAIR_BUS_IDLE_MIN_400K_TICKS           157
+#define FAIR_BUS_IDLE_MIN_1000K_TICKS          157
+
+/*
+ * FAIR_IDLE_DELAY_XK_TICKS field will indicate the number of ticks of the
+ * baud clock required to satisfy the fairness protocol at X KHz.
+ */
+#define FAIR_IDLE_DELAY_100K_TICKS     1000
+#define FAIR_IDLE_DELAY_400K_TICKS     500
+#define FAIR_IDLE_DELAY_1000K_TICKS    500
+
+#define SMB_IDLE_SCALING_100K          \
+       ((FAIR_IDLE_DELAY_100K_TICKS << 16) | FAIR_BUS_IDLE_MIN_100K_TICKS)
+#define SMB_IDLE_SCALING_400K          \
+       ((FAIR_IDLE_DELAY_400K_TICKS << 16) | FAIR_BUS_IDLE_MIN_400K_TICKS)
+#define SMB_IDLE_SCALING_1000K \
+       ((FAIR_IDLE_DELAY_1000K_TICKS << 16) | FAIR_BUS_IDLE_MIN_1000K_TICKS)
+
+#define SMB_CORE_CONFIG_REG3           (SMBUS_MAST_CORE_ADDR_BASE + 0x2B)
+
+#define SMB_CONFIG3_ENMI               BIT(6)
+#define SMB_CONFIG3_ENIDI              BIT(5)
+
+#define SMB_CORE_CONFIG_REG2           (SMBUS_MAST_CORE_ADDR_BASE + 0x2A)
+#define SMB_CORE_CONFIG_REG1           (SMBUS_MAST_CORE_ADDR_BASE + 0x29)
+
+#define SMB_CONFIG1_ASR                        BIT(7)
+#define SMB_CONFIG1_ENAB               BIT(2)
+#define SMB_CONFIG1_RESET              BIT(1)
+#define SMB_CONFIG1_FEN                        BIT(0)
+
+#define SMB_CORE_BUS_CLK_REG_OFF       (SMBUS_MAST_CORE_ADDR_BASE + 0x2C)
+
+/*
+ * BUS_CLK_XK_LOW_PERIOD_TICKS field defines the number of I2C Baud Clock
+ * periods that make up the low phase of the I2C/SMBus bus clock at X KHz.
+ */
+#define BUS_CLK_100K_LOW_PERIOD_TICKS          156
+#define BUS_CLK_400K_LOW_PERIOD_TICKS          41
+#define BUS_CLK_1000K_LOW_PERIOD_TICKS 15
+
+/*
+ * BUS_CLK_XK_HIGH_PERIOD_TICKS field defines the number of I2C Baud Clock
+ * periods that make up the high phase of the I2C/SMBus bus clock at X KHz.
+ */
+#define BUS_CLK_100K_HIGH_PERIOD_TICKS 154
+#define BUS_CLK_400K_HIGH_PERIOD_TICKS 35
+#define BUS_CLK_1000K_HIGH_PERIOD_TICKS        14
+
+#define BUS_CLK_100K                   \
+       ((BUS_CLK_100K_HIGH_PERIOD_TICKS << 8) | BUS_CLK_100K_LOW_PERIOD_TICKS)
+#define BUS_CLK_400K                   \
+       ((BUS_CLK_400K_HIGH_PERIOD_TICKS << 8) | BUS_CLK_400K_LOW_PERIOD_TICKS)
+#define BUS_CLK_1000K                  \
+       ((BUS_CLK_1000K_HIGH_PERIOD_TICKS << 8) | BUS_CLK_1000K_LOW_PERIOD_TICKS)
+
+#define SMB_CORE_CLK_SYNC_REG_OFF      (SMBUS_MAST_CORE_ADDR_BASE + 0x3C)
+
+/*
+ * CLK_SYNC_XK defines the number of clock cycles to sync up to the external
+ * clock before comparing the internal and external clocks for clock stretching
+ * at X KHz.
+ */
+#define CLK_SYNC_100K                  4
+#define CLK_SYNC_400K                  4
+#define CLK_SYNC_1000K         4
+
+#define SMB_CORE_DATA_TIMING_REG_OFF   (SMBUS_MAST_CORE_ADDR_BASE + 0x40)
+
+/*
+ *
+ * FIRST_START_HOLD_XK_TICKS will indicate the number of ticks of the baud
+ * clock required to program 'FIRST_START_HOLD' timer at X KHz. This timer
+ * determines the SCLK hold time following SDAT driven low during the first
+ * START bit in a transfer.
+ */
+#define FIRST_START_HOLD_100K_TICKS    22
+#define FIRST_START_HOLD_400K_TICKS    16
+#define FIRST_START_HOLD_1000K_TICKS   6
+
+/*
+ * STOP_SETUP_XK_TICKS will indicate the number of ticks of the baud clock
+ * required to program 'STOP_SETUP' timer at X KHz. This timer determines the
+ * SDAT setup time from the rising edge of SCLK for a STOP condition.
+ */
+#define STOP_SETUP_100K_TICKS          157
+#define STOP_SETUP_400K_TICKS          20
+#define STOP_SETUP_1000K_TICKS 12
+
+/*
+ * RESTART_SETUP_XK_TICKS will indicate the number of ticks of the baud clock
+ * required to program 'RESTART_SETUP' timer at X KHz. This timer determines the
+ * SDAT setup time from the rising edge of SCLK for a repeated START condition.
+ */
+#define RESTART_SETUP_100K_TICKS       157
+#define RESTART_SETUP_400K_TICKS       20
+#define RESTART_SETUP_1000K_TICKS      12
+
+/*
+ * DATA_HOLD_XK_TICKS will indicate the number of ticks of the baud clock
+ * required to program 'DATA_HOLD' timer at X KHz. This timer determines the
+ * SDAT hold time following SCLK driven low.
+ */
+#define DATA_HOLD_100K_TICKS           2
+#define DATA_HOLD_400K_TICKS           2
+#define DATA_HOLD_1000K_TICKS          2
+
+#define DATA_TIMING_100K               \
+       ((FIRST_START_HOLD_100K_TICKS << 24) | (STOP_SETUP_100K_TICKS << 16) | \
+       (RESTART_SETUP_100K_TICKS << 8) | DATA_HOLD_100K_TICKS)
+#define DATA_TIMING_400K               \
+       ((FIRST_START_HOLD_400K_TICKS << 24) | (STOP_SETUP_400K_TICKS << 16) | \
+       (RESTART_SETUP_400K_TICKS << 8) | DATA_HOLD_400K_TICKS)
+#define DATA_TIMING_1000K              \
+       ((FIRST_START_HOLD_1000K_TICKS << 24) | (STOP_SETUP_1000K_TICKS << 16) | \
+       (RESTART_SETUP_1000K_TICKS << 8) | DATA_HOLD_1000K_TICKS)
+
+#define SMB_CORE_TO_SCALING_REG_OFF    (SMBUS_MAST_CORE_ADDR_BASE + 0x44)
+
+/*
+ * BUS_IDLE_MIN_XK_TICKS defines Bus Idle Minimum Time.
+ * Bus Idle Minimum time = BUS_IDLE_MIN[7:0] x Baud_Clock_Period x
+ * (BUS_IDLE_MIN_XK_TICKS[7] ? 4,1)
+ */
+#define BUS_IDLE_MIN_100K_TICKS                167UL
+#define BUS_IDLE_MIN_400K_TICKS                139UL
+#define BUS_IDLE_MIN_1000K_TICKS               133UL
+
+/*
+ * CTRL_CUM_TIME_OUT_XK_TICKS defines SMBus Controller Cumulative Time-Out.
+ * SMBus Controller Cumulative Time-Out duration =
+ * CTRL_CUM_TIME_OUT_XK_TICKS[7:0] x Baud_Clock_Period x 2048
+ */
+#define CTRL_CUM_TIME_OUT_100K_TICKS           159
+#define CTRL_CUM_TIME_OUT_400K_TICKS           159
+#define CTRL_CUM_TIME_OUT_1000K_TICKS          159
+
+/*
+ * TARGET_CUM_TIME_OUT_XK_TICKS defines SMBus Target Cumulative Time-Out duration.
+ * SMBus Target Cumulative Time-Out duration = TARGET_CUM_TIME_OUT_XK_TICKS[7:0] x
+ * Baud_Clock_Period x 4096
+ */
+#define TARGET_CUM_TIME_OUT_100K_TICKS 199
+#define TARGET_CUM_TIME_OUT_400K_TICKS 199
+#define TARGET_CUM_TIME_OUT_1000K_TICKS        199
+
+/*
+ * CLOCK_HIGH_TIME_OUT_XK defines Clock High time out period.
+ * Clock High time out period = CLOCK_HIGH_TIME_OUT_XK[7:0] x Baud_Clock_Period x 8
+ */
+#define CLOCK_HIGH_TIME_OUT_100K_TICKS 204
+#define CLOCK_HIGH_TIME_OUT_400K_TICKS 204
+#define CLOCK_HIGH_TIME_OUT_1000K_TICKS        204
+
+#define TO_SCALING_100K                \
+       ((BUS_IDLE_MIN_100K_TICKS << 24) | (CTRL_CUM_TIME_OUT_100K_TICKS << 16) | \
+       (TARGET_CUM_TIME_OUT_100K_TICKS << 8) | CLOCK_HIGH_TIME_OUT_100K_TICKS)
+#define TO_SCALING_400K                \
+       ((BUS_IDLE_MIN_400K_TICKS << 24) | (CTRL_CUM_TIME_OUT_400K_TICKS << 16) | \
+       (TARGET_CUM_TIME_OUT_400K_TICKS << 8) | CLOCK_HIGH_TIME_OUT_400K_TICKS)
+#define TO_SCALING_1000K               \
+       ((BUS_IDLE_MIN_1000K_TICKS << 24) | (CTRL_CUM_TIME_OUT_1000K_TICKS << 16) | \
+       (TARGET_CUM_TIME_OUT_1000K_TICKS << 8) | CLOCK_HIGH_TIME_OUT_1000K_TICKS)
+
+#define I2C_SCL_PAD_CTRL_REG_OFF       (SMBUS_MAST_CORE_ADDR_BASE + 0x100)
+#define I2C_SDA_PAD_CTRL_REG_OFF       (SMBUS_MAST_CORE_ADDR_BASE + 0x101)
+
+#define I2C_FOD_EN                     BIT(4)
+#define I2C_PULL_UP_EN                 BIT(3)
+#define I2C_PULL_DOWN_EN               BIT(2)
+#define I2C_INPUT_EN                   BIT(1)
+#define I2C_OUTPUT_EN                  BIT(0)
+
+#define SMBUS_CONTROL_REG_OFF  (SMBUS_MAST_CORE_ADDR_BASE + 0x200)
+
+#define CTL_RESET_COUNTERS             BIT(3)
+#define CTL_TRANSFER_DIR               BIT(2)
+#define CTL_HOST_FIFO_ENTRY            BIT(1)
+#define CTL_RUN                                BIT(0)
+
+#define I2C_DIRN_WRITE                 0
+#define I2C_DIRN_READ                  1
+
+#define SMBUS_STATUS_REG_OFF   (SMBUS_MAST_CORE_ADDR_BASE + 0x204)
+
+#define STA_DMA_TERM                   BIT(7)
+#define STA_DMA_REQ                    BIT(6)
+#define STA_THRESHOLD                  BIT(2)
+#define STA_BUF_FULL                   BIT(1)
+#define STA_BUF_EMPTY                  BIT(0)
+
+#define SMBUS_INTR_STAT_REG_OFF        (SMBUS_MAST_CORE_ADDR_BASE + 0x208)
+
+#define INTR_STAT_DMA_TERM             BIT(7)
+#define INTR_STAT_THRESHOLD            BIT(2)
+#define INTR_STAT_BUF_FULL             BIT(1)
+#define INTR_STAT_BUF_EMPTY            BIT(0)
+
+#define SMBUS_INTR_MSK_REG_OFF (SMBUS_MAST_CORE_ADDR_BASE + 0x20C)
+
+#define INTR_MSK_DMA_TERM              BIT(7)
+#define INTR_MSK_THRESHOLD             BIT(2)
+#define INTR_MSK_BUF_FULL              BIT(1)
+#define INTR_MSK_BUF_EMPTY             BIT(0)
+
+#define ALL_NW_LAYER_INTERRUPTS  \
+       (INTR_MSK_DMA_TERM | INTR_MSK_THRESHOLD | INTR_MSK_BUF_FULL | \
+        INTR_MSK_BUF_EMPTY)
+
+#define SMBUS_MCU_COUNTER_REG_OFF      (SMBUS_MAST_CORE_ADDR_BASE + 0x214)
+
+#define SMBALERT_MST_PAD_CTRL_REG_OFF  (SMBUS_MAST_CORE_ADDR_BASE + 0x230)
+
+#define SMBALERT_MST_PU                        BIT(0)
+
+#define SMBUS_GEN_INT_STAT_REG_OFF     (SMBUS_MAST_CORE_ADDR_BASE + 0x23C)
+
+#define SMBUS_GEN_INT_MASK_REG_OFF     (SMBUS_MAST_CORE_ADDR_BASE + 0x240)
+
+#define SMBALERT_INTR_MASK             BIT(10)
+#define I2C_BUF_MSTR_INTR_MASK         BIT(9)
+#define I2C_INTR_MASK                  BIT(8)
+#define SMBALERT_WAKE_INTR_MASK                BIT(2)
+#define I2C_BUF_MSTR_WAKE_INTR_MASK    BIT(1)
+#define I2C_WAKE_INTR_MASK             BIT(0)
+
+#define ALL_HIGH_LAYER_INTR     \
+       (SMBALERT_INTR_MASK | I2C_BUF_MSTR_INTR_MASK | I2C_INTR_MASK | \
+       SMBALERT_WAKE_INTR_MASK | I2C_BUF_MSTR_WAKE_INTR_MASK | \
+       I2C_WAKE_INTR_MASK)
+
+#define SMBUS_RESET_REG                (SMBUS_MAST_CORE_ADDR_BASE + 0x248)
+
+#define PERI_SMBUS_D3_RESET_DIS                BIT(16)
+
+#define SMBUS_MST_BUF          (SMBUS_MAST_CORE_ADDR_BASE + 0x280)
+
+#define SMBUS_BUF_MAX_SIZE             0x80
+
+#define I2C_FLAGS_DIRECT_MODE          BIT(7)
+#define I2C_FLAGS_POLLING_MODE         BIT(6)
+#define I2C_FLAGS_STOP                 BIT(5)
+#define I2C_FLAGS_SMB_BLK_READ         BIT(4)
+
+#define PCI1XXXX_I2C_TIMEOUT_MS                1000
+
+/* General Purpose Register. */
+#define SMB_GPR_REG            (SMBUS_MAST_CORE_ADDR_BASE + 0x1000 + 0x0c00 + \
+                               0x00)
+
+/* Lock Register. */
+#define SMB_GPR_LOCK_REG       (SMBUS_MAST_CORE_ADDR_BASE + 0x1000 + 0x0000 + \
+                               0x00A0)
+
+#define SMBUS_PERI_LOCK                BIT(3)
+
+struct pci1xxxx_i2c {
+       struct completion i2c_xfer_done;
+       bool i2c_xfer_in_progress;
+       struct i2c_adapter adap;
+       void __iomem *i2c_base;
+       u32 freq;
+       u32 flags;
+};
+
+static int set_sys_lock(struct pci1xxxx_i2c *i2c)
+{
+       void __iomem *p = i2c->i2c_base + SMB_GPR_LOCK_REG;
+       u8 data;
+
+       writel(SMBUS_PERI_LOCK, p);
+       data = readl(p);
+       if (data != SMBUS_PERI_LOCK)
+               return -EPERM;
+
+       return 0;
+}
+
+static int release_sys_lock(struct pci1xxxx_i2c *i2c)
+{
+       void __iomem *p = i2c->i2c_base + SMB_GPR_LOCK_REG;
+       u8 data;
+
+       data = readl(p);
+       if (data != SMBUS_PERI_LOCK)
+               return 0;
+
+       writel(0, p);
+       data = readl(p);
+       if (data & SMBUS_PERI_LOCK)
+               return -EPERM;
+
+       return 0;
+}
+
+static void pci1xxxx_ack_high_level_intr(struct pci1xxxx_i2c *i2c, u16 intr_msk)
+{
+       writew(intr_msk, i2c->i2c_base + SMBUS_GEN_INT_STAT_REG_OFF);
+}
+
+static void pci1xxxx_i2c_configure_smbalert_pin(struct pci1xxxx_i2c *i2c,
+                                               bool enable)
+{
+       void __iomem *p = i2c->i2c_base + SMBALERT_MST_PAD_CTRL_REG_OFF;
+       u8 regval;
+
+       regval = readb(p);
+
+       if (enable)
+               regval |= SMBALERT_MST_PU;
+       else
+               regval &= ~SMBALERT_MST_PU;
+
+       writeb(regval, p);
+}
+
+static void pci1xxxx_i2c_send_start_stop(struct pci1xxxx_i2c *i2c, bool start)
+{
+       void __iomem *p = i2c->i2c_base + SMB_CORE_CMD_REG_OFF1;
+       u8 regval;
+
+       regval = readb(p);
+
+       if (start)
+               regval |= SMB_CORE_CMD_START;
+       else
+               regval |= SMB_CORE_CMD_STOP;
+
+       writeb(regval, p);
+}
+
+/*
+ * When accessing the core control reg, we should not do a read modified write
+ * as they are write '1' to clear bits. Instead we need to write with the
+ * specific bits that needs to be set.
+ */
+static void pci1xxxx_i2c_set_clear_FW_ACK(struct pci1xxxx_i2c *i2c, bool set)
+{
+       u8 regval;
+
+       if (set)
+               regval = SMB_CORE_CTRL_FW_ACK | SMB_CORE_CTRL_ESO | SMB_CORE_CTRL_ACK;
+       else
+               regval = SMB_CORE_CTRL_ESO | SMB_CORE_CTRL_ACK;
+
+       writeb(regval, i2c->i2c_base + SMB_CORE_CTRL_REG_OFF);
+}
+
+static void pci1xxxx_i2c_buffer_write(struct pci1xxxx_i2c *i2c, u8 slaveaddr,
+                                     u8 transferlen, unsigned char *buf)
+{
+       void __iomem *p = i2c->i2c_base + SMBUS_MST_BUF;
+
+       if (slaveaddr)
+               writeb(slaveaddr, p++);
+
+       if (buf)
+               memcpy_toio(p, buf, transferlen);
+}
+
+/*
+ * When accessing the core control reg, we should not do a read modified write
+ * as there are write '1' to clear bits. Instead we need to write with the
+ * specific bits that needs to be set.
+ */
+static void pci1xxxx_i2c_enable_ESO(struct pci1xxxx_i2c *i2c)
+{
+       writeb(SMB_CORE_CTRL_ESO, i2c->i2c_base + SMB_CORE_CTRL_REG_OFF);
+}
+
+static void pci1xxxx_i2c_reset_counters(struct pci1xxxx_i2c *i2c)
+{
+       void __iomem *p = i2c->i2c_base + SMBUS_CONTROL_REG_OFF;
+       u8 regval;
+
+       regval = readb(p);
+       regval |= CTL_RESET_COUNTERS;
+       writeb(regval, p);
+}
+
+static void pci1xxxx_i2c_set_transfer_dir(struct pci1xxxx_i2c *i2c, u8 direction)
+{
+       void __iomem *p = i2c->i2c_base + SMBUS_CONTROL_REG_OFF;
+       u8 regval;
+
+       regval = readb(p);
+       if (direction == I2C_DIRN_WRITE)
+               regval &= ~CTL_TRANSFER_DIR;
+       else
+               regval |= CTL_TRANSFER_DIR;
+
+       writeb(regval, p);
+}
+
+static void pci1xxxx_i2c_set_mcu_count(struct pci1xxxx_i2c *i2c, u8 count)
+{
+       writeb(count, i2c->i2c_base + SMBUS_MCU_COUNTER_REG_OFF);
+}
+
+static void pci1xxxx_i2c_set_read_count(struct pci1xxxx_i2c *i2c, u8 readcount)
+{
+       writeb(readcount, i2c->i2c_base + SMB_CORE_CMD_REG_OFF3);
+}
+
+static void pci1xxxx_i2c_set_write_count(struct pci1xxxx_i2c *i2c, u8 writecount)
+{
+       writeb(writecount, i2c->i2c_base + SMB_CORE_CMD_REG_OFF2);
+}
+
+static void pci1xxxx_i2c_set_DMA_run(struct pci1xxxx_i2c *i2c)
+{
+       void __iomem *p = i2c->i2c_base + SMBUS_CONTROL_REG_OFF;
+       u8 regval;
+
+       regval = readb(p);
+       regval |= CTL_RUN;
+       writeb(regval, p);
+}
+
+static void pci1xxxx_i2c_set_mrun_proceed(struct pci1xxxx_i2c *i2c)
+{
+       void __iomem *p = i2c->i2c_base + SMB_CORE_CMD_REG_OFF0;
+       u8 regval;
+
+       regval = readb(p);
+       regval |= SMB_CORE_CMD_M_RUN;
+       regval |= SMB_CORE_CMD_M_PROCEED;
+       writeb(regval, p);
+}
+
+static void pci1xxxx_i2c_start_DMA(struct pci1xxxx_i2c *i2c)
+{
+       pci1xxxx_i2c_set_DMA_run(i2c);
+       pci1xxxx_i2c_set_mrun_proceed(i2c);
+}
+
+static void pci1xxxx_i2c_config_asr(struct pci1xxxx_i2c *i2c, bool enable)
+{
+       void __iomem *p = i2c->i2c_base + SMB_CORE_CONFIG_REG1;
+       u8 regval;
+
+       regval = readb(p);
+       if (enable)
+               regval |= SMB_CONFIG1_ASR;
+       else
+               regval &= ~SMB_CONFIG1_ASR;
+       writeb(regval, p);
+}
+
+static irqreturn_t pci1xxxx_i2c_isr(int irq, void *dev)
+{
+       struct pci1xxxx_i2c *i2c = dev;
+       void __iomem *p1 = i2c->i2c_base + SMBUS_GEN_INT_STAT_REG_OFF;
+       void __iomem *p2 = i2c->i2c_base + SMBUS_INTR_STAT_REG_OFF;
+       irqreturn_t intr_handled = IRQ_NONE;
+       u16 reg1;
+       u8 reg3;
+
+       /*
+        *  Read the SMBus interrupt status register to see if the
+        *  DMA_TERM interrupt has caused this callback.
+        */
+       reg1 = readw(p1);
+
+       if (reg1 & I2C_BUF_MSTR_INTR_MASK) {
+               reg3 = readb(p2);
+               if (reg3 & INTR_STAT_DMA_TERM) {
+                       complete(&i2c->i2c_xfer_done);
+                       intr_handled = IRQ_HANDLED;
+                       writeb(INTR_STAT_DMA_TERM, p2);
+               }
+               pci1xxxx_ack_high_level_intr(i2c, I2C_BUF_MSTR_INTR_MASK);
+       }
+
+       if (reg1 & SMBALERT_INTR_MASK) {
+               intr_handled = IRQ_HANDLED;
+               pci1xxxx_ack_high_level_intr(i2c, SMBALERT_INTR_MASK);
+       }
+
+       return intr_handled;
+}
+
+static void pci1xxxx_i2c_set_count(struct pci1xxxx_i2c *i2c, u8 mcucount,
+                                  u8 writecount, u8 readcount)
+{
+       pci1xxxx_i2c_set_mcu_count(i2c, mcucount);
+       pci1xxxx_i2c_set_write_count(i2c, writecount);
+       pci1xxxx_i2c_set_read_count(i2c, readcount);
+}
+
+static void pci1xxxx_i2c_set_readm(struct pci1xxxx_i2c *i2c, bool enable)
+{
+       void __iomem *p = i2c->i2c_base + SMB_CORE_CMD_REG_OFF1;
+       u8 regval;
+
+       regval = readb(p);
+       if (enable)
+               regval |= SMB_CORE_CMD_READM;
+       else
+               regval &= ~SMB_CORE_CMD_READM;
+
+       writeb(regval, p);
+}
+
+static void pci1xxxx_ack_nw_layer_intr(struct pci1xxxx_i2c *i2c, u8 ack_intr_msk)
+{
+       writeb(ack_intr_msk, i2c->i2c_base + SMBUS_INTR_STAT_REG_OFF);
+}
+
+static void pci1xxxx_config_nw_layer_intr(struct pci1xxxx_i2c *i2c,
+                                         u8 intr_msk, bool enable)
+{
+       void __iomem *p = i2c->i2c_base + SMBUS_INTR_MSK_REG_OFF;
+       u8 regval;
+
+       regval = readb(p);
+       if (enable)
+               regval &= ~intr_msk;
+       else
+               regval |= intr_msk;
+
+       writeb(regval, p);
+}
+
+static void pci1xxxx_i2c_config_padctrl(struct pci1xxxx_i2c *i2c, bool enable)
+{
+       void __iomem *p1 = i2c->i2c_base + I2C_SCL_PAD_CTRL_REG_OFF;
+       void __iomem *p2 = i2c->i2c_base + I2C_SDA_PAD_CTRL_REG_OFF;
+       u8 regval;
+
+       regval = readb(p1);
+       if (enable)
+               regval |= I2C_INPUT_EN | I2C_OUTPUT_EN;
+       else
+               regval &= ~(I2C_INPUT_EN | I2C_OUTPUT_EN);
+
+       writeb(regval, p1);
+
+       regval = readb(p2);
+       if (enable)
+               regval |= I2C_INPUT_EN | I2C_OUTPUT_EN;
+       else
+               regval &= ~(I2C_INPUT_EN | I2C_OUTPUT_EN);
+
+       writeb(regval, p2);
+}
+
+static void pci1xxxx_i2c_set_mode(struct pci1xxxx_i2c *i2c)
+{
+       void __iomem *p = i2c->i2c_base + SMBUS_CONTROL_REG_OFF;
+       u8 regval;
+
+       regval = readb(p);
+       if (i2c->flags & I2C_FLAGS_DIRECT_MODE)
+               regval &= ~CTL_HOST_FIFO_ENTRY;
+       else
+               regval |= CTL_HOST_FIFO_ENTRY;
+
+       writeb(regval, p);
+}
+
+static void pci1xxxx_i2c_config_high_level_intr(struct pci1xxxx_i2c *i2c,
+                                               u16 intr_msk, bool enable)
+{
+       void __iomem *p = i2c->i2c_base + SMBUS_GEN_INT_MASK_REG_OFF;
+       u16 regval;
+
+       regval = readw(p);
+       if (enable)
+               regval &= ~intr_msk;
+       else
+               regval |= intr_msk;
+       writew(regval, p);
+}
+
+static void pci1xxxx_i2c_configure_core_reg(struct pci1xxxx_i2c *i2c, bool enable)
+{
+       void __iomem *p1 = i2c->i2c_base + SMB_CORE_CONFIG_REG1;
+       void __iomem *p3 = i2c->i2c_base + SMB_CORE_CONFIG_REG3;
+       u8 reg1;
+       u8 reg3;
+
+       reg1 = readb(p1);
+       reg3 = readb(p3);
+       if (enable) {
+               reg1 |= SMB_CONFIG1_ENAB | SMB_CONFIG1_FEN;
+               reg3 |= SMB_CONFIG3_ENMI | SMB_CONFIG3_ENIDI;
+       } else {
+               reg1 &= ~(SMB_CONFIG1_ENAB | SMB_CONFIG1_FEN);
+               reg3 &= ~(SMB_CONFIG3_ENMI | SMB_CONFIG3_ENIDI);
+       }
+
+       writeb(reg1, p1);
+       writeb(reg3, p3);
+}
+
+static void pci1xxxx_i2c_set_freq(struct pci1xxxx_i2c *i2c)
+{
+       void __iomem *bp = i2c->i2c_base;
+       void __iomem *p_idle_scaling = bp + SMB_CORE_IDLE_SCALING_REG_OFF;
+       void __iomem *p_data_timing = bp + SMB_CORE_DATA_TIMING_REG_OFF;
+       void __iomem *p_hold_time = bp + SMB_CORE_SR_HOLD_TIME_REG_OFF;
+       void __iomem *p_to_scaling = bp + SMB_CORE_TO_SCALING_REG_OFF;
+       void __iomem *p_clk_sync = bp + SMB_CORE_CLK_SYNC_REG_OFF;
+       void __iomem *p_clk_reg = bp + SMB_CORE_BUS_CLK_REG_OFF;
+
+       switch (i2c->freq) {
+       case I2C_MAX_STANDARD_MODE_FREQ:
+               writeb(SR_HOLD_TIME_100K_TICKS, p_hold_time);
+               writel(SMB_IDLE_SCALING_100K, p_idle_scaling);
+               writew(BUS_CLK_100K, p_clk_reg);
+               writel(CLK_SYNC_100K, p_clk_sync);
+               writel(DATA_TIMING_100K, p_data_timing);
+               writel(TO_SCALING_100K, p_to_scaling);
+               break;
+
+       case I2C_MAX_FAST_MODE_PLUS_FREQ:
+               writeb(SR_HOLD_TIME_1000K_TICKS, p_hold_time);
+               writel(SMB_IDLE_SCALING_1000K, p_idle_scaling);
+               writew(BUS_CLK_1000K, p_clk_reg);
+               writel(CLK_SYNC_1000K, p_clk_sync);
+               writel(DATA_TIMING_1000K, p_data_timing);
+               writel(TO_SCALING_1000K, p_to_scaling);
+               break;
+
+       case I2C_MAX_FAST_MODE_FREQ:
+       default:
+               writeb(SR_HOLD_TIME_400K_TICKS, p_hold_time);
+               writel(SMB_IDLE_SCALING_400K, p_idle_scaling);
+               writew(BUS_CLK_400K, p_clk_reg);
+               writel(CLK_SYNC_400K, p_clk_sync);
+               writel(DATA_TIMING_400K, p_data_timing);
+               writel(TO_SCALING_400K, p_to_scaling);
+               break;
+       }
+}
+
+static void pci1xxxx_i2c_init(struct pci1xxxx_i2c *i2c)
+{
+       void __iomem *p2 = i2c->i2c_base + SMBUS_STATUS_REG_OFF;
+       void __iomem *p1 = i2c->i2c_base + SMB_GPR_REG;
+       u8 regval;
+       u8 ret;
+
+       ret = set_sys_lock(i2c);
+       if (ret == -EPERM) {
+               /*
+                * Configure I2C Fast Mode as default frequency if unable
+                * to acquire sys lock.
+                */
+               regval = 0;
+       } else {
+               regval = readl(p1);
+               release_sys_lock(i2c);
+       }
+
+       switch (regval) {
+       case 0:
+               i2c->freq = I2C_MAX_FAST_MODE_FREQ;
+               pci1xxxx_i2c_set_freq(i2c);
+               break;
+       case 1:
+               i2c->freq = I2C_MAX_STANDARD_MODE_FREQ;
+               pci1xxxx_i2c_set_freq(i2c);
+               break;
+       case 2:
+               i2c->freq = I2C_MAX_FAST_MODE_PLUS_FREQ;
+               pci1xxxx_i2c_set_freq(i2c);
+               break;
+       case 3:
+       default:
+               break;
+       }
+
+       pci1xxxx_i2c_config_padctrl(i2c, true);
+       i2c->flags |= I2C_FLAGS_DIRECT_MODE;
+       pci1xxxx_i2c_set_mode(i2c);
+
+       /*
+        * Added as a precaution since BUF_EMPTY in status register
+        * also trigered an Interrupt.
+        */
+       writeb(STA_BUF_EMPTY, p2);
+
+       /* Configure core I2c control registers. */
+       pci1xxxx_i2c_configure_core_reg(i2c, true);
+
+       /*
+        * Enable pull-up for the SMB alert pin which is just used for
+        * wakeup right now.
+        */
+       pci1xxxx_i2c_configure_smbalert_pin(i2c, true);
+}
+
+static void pci1xxxx_i2c_clear_flags(struct pci1xxxx_i2c *i2c)
+{
+       u8 regval;
+
+       /* Reset the internal buffer counters. */
+       pci1xxxx_i2c_reset_counters(i2c);
+
+       /* Clear low level interrupts. */
+       regval = COMPLETION_MNAKX | COMPLETION_IDLE | COMPLETION_MDONE;
+       writeb(regval, i2c->i2c_base + SMB_CORE_COMPLETION_REG_OFF3);
+       reinit_completion(&i2c->i2c_xfer_done);
+       pci1xxxx_ack_nw_layer_intr(i2c, ALL_NW_LAYER_INTERRUPTS);
+       pci1xxxx_ack_high_level_intr(i2c, ALL_HIGH_LAYER_INTR);
+}
+
+static int pci1xxxx_i2c_read(struct pci1xxxx_i2c *i2c, u8 slaveaddr,
+                            unsigned char *buf, u16 total_len)
+{
+       void __iomem *p2 = i2c->i2c_base + SMB_CORE_COMPLETION_REG_OFF3;
+       void __iomem *p1 = i2c->i2c_base + SMB_CORE_CMD_REG_OFF1;
+       void __iomem *p3 = i2c->i2c_base + SMBUS_MST_BUF;
+       unsigned long time_left;
+       u16 remainingbytes;
+       u8 transferlen;
+       int retval = 0;
+       u8 read_count;
+       u32 regval;
+       u16 count;
+
+       /* Enable I2C host controller by setting the ESO bit in the CONTROL REG. */
+       pci1xxxx_i2c_enable_ESO(i2c);
+       pci1xxxx_i2c_clear_flags(i2c);
+       pci1xxxx_config_nw_layer_intr(i2c, INTR_MSK_DMA_TERM, true);
+       pci1xxxx_i2c_config_high_level_intr(i2c, I2C_BUF_MSTR_INTR_MASK, true);
+
+       /*
+        * The I2C transfer could be more than 128 bytes. Our Core is
+        * capable of only sending 128 at a time.
+        * As far as the I2C read is concerned, initailly send the
+        * read slave address along with the number of bytes to read in
+        * ReadCount. After sending the slave address the interrupt
+        * is generated. On seeing the ACK for the slave address, reverse the
+        * buffer direction and run the DMA to initiate Read from slave.
+        */
+       for (count = 0; count < total_len; count += transferlen) {
+
+               /*
+                * Before start of any transaction clear the existing
+                * START/STOP conditions.
+                */
+               writeb(0, p1);
+               remainingbytes = total_len - count;
+               transferlen = min_t(u16, remainingbytes, SMBUS_BUF_MAX_SIZE);
+
+               /*
+                * Send STOP bit for the last chunk in the transaction.
+                * For I2C read transaction of more than BUF_SIZE, NACK should
+                * only be sent for the last read.
+                * Hence a bit FW_ACK is set for all the read chunks except for
+                * the last chunk. For the last chunk NACK should be sent and
+                * FW_ACK is cleared Send STOP only when I2C_FLAGS_STOP bit is
+                * set in the flags and only for the last transaction.
+                */
+               if ((count + transferlen >= total_len) &&
+                   (i2c->flags & I2C_FLAGS_STOP)) {
+                       pci1xxxx_i2c_set_clear_FW_ACK(i2c, false);
+                       pci1xxxx_i2c_send_start_stop(i2c, 0);
+               } else {
+                       pci1xxxx_i2c_set_clear_FW_ACK(i2c, true);
+               }
+
+               /* Send START bit for the first transaction. */
+               if (count == 0) {
+                       pci1xxxx_i2c_set_transfer_dir(i2c, I2C_DIRN_WRITE);
+                       pci1xxxx_i2c_send_start_stop(i2c, 1);
+
+                       /* Write I2c buffer with just the slave addr. */
+                       pci1xxxx_i2c_buffer_write(i2c, slaveaddr, 0, NULL);
+
+                       /* Set the count. Readcount is the transfer bytes. */
+                       pci1xxxx_i2c_set_count(i2c, 1, 1, transferlen);
+
+                       /*
+                        * Set the Auto_start_read bit so that the HW itself
+                        * will take care of the read phase.
+                        */
+                       pci1xxxx_i2c_config_asr(i2c, true);
+                       if (i2c->flags & I2C_FLAGS_SMB_BLK_READ)
+                               pci1xxxx_i2c_set_readm(i2c, true);
+               } else {
+                       pci1xxxx_i2c_set_count(i2c, 0, 0, transferlen);
+                       pci1xxxx_i2c_config_asr(i2c, false);
+                       pci1xxxx_i2c_clear_flags(i2c);
+                       pci1xxxx_i2c_set_transfer_dir(i2c, I2C_DIRN_READ);
+               }
+
+               /* Start the DMA. */
+               pci1xxxx_i2c_start_DMA(i2c);
+
+               /* Wait for the DMA_TERM interrupt. */
+               time_left = wait_for_completion_timeout(&i2c->i2c_xfer_done,
+                           msecs_to_jiffies(PCI1XXXX_I2C_TIMEOUT_MS));
+               if (time_left == 0) {
+                       /* Reset the I2C core to release the bus lock. */
+                       pci1xxxx_i2c_init(i2c);
+                       retval = -ETIMEDOUT;
+                       goto cleanup;
+               }
+
+               /* Read the completion reg to know the reason for DMA_TERM. */
+               regval = readb(p2);
+
+               /* Slave did not respond. */
+               if (regval & COMPLETION_MNAKX) {
+                       writeb(COMPLETION_MNAKX, p2);
+                       retval = -ETIMEDOUT;
+                       goto cleanup;
+               }
+
+               if (i2c->flags & I2C_FLAGS_SMB_BLK_READ) {
+                       buf[0] = readb(p3);
+                       read_count = buf[0];
+                       memcpy_fromio(&buf[1], p3 + 1, read_count);
+               } else {
+                       memcpy_fromio(&buf[count], p3, transferlen);
+               }
+       }
+
+cleanup:
+       /* Disable all the interrupts. */
+       pci1xxxx_config_nw_layer_intr(i2c, INTR_MSK_DMA_TERM, false);
+       pci1xxxx_i2c_config_high_level_intr(i2c, I2C_BUF_MSTR_INTR_MASK, false);
+       pci1xxxx_i2c_config_asr(i2c, false);
+       return retval;
+}
+
+static int pci1xxxx_i2c_write(struct pci1xxxx_i2c *i2c, u8 slaveaddr,
+                             unsigned char *buf, u16 total_len)
+{
+       void __iomem *p2 = i2c->i2c_base + SMB_CORE_COMPLETION_REG_OFF3;
+       void __iomem *p1 = i2c->i2c_base + SMB_CORE_CMD_REG_OFF1;
+       unsigned long time_left;
+       u16 remainingbytes;
+       u8 actualwritelen;
+       u8 transferlen;
+       int retval = 0;
+       u32 regval;
+       u16 count;
+
+       /* Enable I2C host controller by setting the ESO bit in the CONTROL REG. */
+       pci1xxxx_i2c_enable_ESO(i2c);
+
+       /* Set the Buffer direction. */
+       pci1xxxx_i2c_set_transfer_dir(i2c, I2C_DIRN_WRITE);
+       pci1xxxx_config_nw_layer_intr(i2c, INTR_MSK_DMA_TERM, true);
+       pci1xxxx_i2c_config_high_level_intr(i2c, I2C_BUF_MSTR_INTR_MASK, true);
+
+       /*
+        * The i2c transfer could be more than 128 bytes. Our Core is
+        * capable of only sending 128 at a time.
+        */
+       for (count = 0; count < total_len; count += transferlen) {
+               /*
+                * Before start of any transaction clear the existing
+                * START/STOP conditions.
+                */
+               writeb(0, p1);
+               pci1xxxx_i2c_clear_flags(i2c);
+               remainingbytes = total_len - count;
+
+               /* If it is the starting of the transaction send START. */
+               if (count == 0) {
+                       pci1xxxx_i2c_send_start_stop(i2c, 1);
+
+                       /* -1 for the slave address. */
+                       transferlen = min_t(u16, SMBUS_BUF_MAX_SIZE - 1,
+                                           remainingbytes);
+                       pci1xxxx_i2c_buffer_write(i2c, slaveaddr,
+                                                 transferlen, &buf[count]);
+                       /*
+                        * The actual number of bytes written on the I2C bus
+                        * is including the slave address.
+                        */
+                       actualwritelen = transferlen + 1;
+               } else {
+                       transferlen = min_t(u16, SMBUS_BUF_MAX_SIZE, remainingbytes);
+                       pci1xxxx_i2c_buffer_write(i2c, 0, transferlen, &buf[count]);
+                       actualwritelen = transferlen;
+               }
+
+               pci1xxxx_i2c_set_count(i2c, actualwritelen, actualwritelen, 0);
+
+               /*
+                * Send STOP only when I2C_FLAGS_STOP bit is set in the flags and
+                * only for the last transaction.
+                */
+               if (remainingbytes <= transferlen &&
+                  (i2c->flags & I2C_FLAGS_STOP))
+                       pci1xxxx_i2c_send_start_stop(i2c, 0);
+
+               pci1xxxx_i2c_start_DMA(i2c);
+
+               /*
+                * Wait for the DMA_TERM interrupt.
+                */
+               time_left = wait_for_completion_timeout(&i2c->i2c_xfer_done,
+                           msecs_to_jiffies(PCI1XXXX_I2C_TIMEOUT_MS));
+               if (time_left == 0) {
+                       /* Reset the I2C core to release the bus lock. */
+                       pci1xxxx_i2c_init(i2c);
+                       retval = -ETIMEDOUT;
+                       goto cleanup;
+               }
+
+               regval = readb(p2);
+               if (regval & COMPLETION_MNAKX) {
+                       writeb(COMPLETION_MNAKX, p2);
+                       retval = -ETIMEDOUT;
+                       goto cleanup;
+               }
+       }
+cleanup:
+       /* Disable all the interrupts. */
+       pci1xxxx_config_nw_layer_intr(i2c, INTR_MSK_DMA_TERM, false);
+       pci1xxxx_i2c_config_high_level_intr(i2c, I2C_BUF_MSTR_INTR_MASK, false);
+
+       return retval;
+}
+
+static int pci1xxxx_i2c_xfer(struct i2c_adapter *adap,
+                            struct i2c_msg *msgs, int num)
+{
+       struct pci1xxxx_i2c *i2c = i2c_get_adapdata(adap);
+       u8 slaveaddr;
+       int retval;
+       u32 i;
+
+       i2c->i2c_xfer_in_progress = true;
+       for (i = 0; i < num; i++) {
+               slaveaddr = i2c_8bit_addr_from_msg(&msgs[i]);
+
+               /*
+                * Send the STOP bit if the transfer is the final one or
+                * if the I2C_M_STOP flag is set.
+                */
+               if ((i == num - 1) || (msgs[i].flags & I2C_M_STOP))
+                       i2c->flags |= I2C_FLAGS_STOP;
+               else
+                       i2c->flags &= ~I2C_FLAGS_STOP;
+
+               if (msgs[i].flags & I2C_M_RECV_LEN)
+                       i2c->flags |= I2C_FLAGS_SMB_BLK_READ;
+               else
+                       i2c->flags &= ~I2C_FLAGS_SMB_BLK_READ;
+
+               if (msgs[i].flags & I2C_M_RD)
+                       retval = pci1xxxx_i2c_read(i2c, slaveaddr,
+                                                  msgs[i].buf, msgs[i].len);
+               else
+                       retval = pci1xxxx_i2c_write(i2c, slaveaddr,
+                                                   msgs[i].buf, msgs[i].len);
+
+               if (retval < 0)
+                       break;
+       }
+       i2c->i2c_xfer_in_progress = false;
+
+       if (retval < 0)
+               return retval;
+
+       return num;
+}
+
+/*
+ * List of supported functions by the driver.
+ */
+static u32 pci1xxxx_i2c_get_funcs(struct i2c_adapter *adap)
+{
+       return I2C_FUNC_I2C | I2C_FUNC_PROTOCOL_MANGLING |
+               I2C_FUNC_SMBUS_BLOCK_PROC_CALL |
+               I2C_FUNC_SMBUS_BYTE |
+               I2C_FUNC_SMBUS_BYTE_DATA |
+               I2C_FUNC_SMBUS_WORD_DATA |
+               I2C_FUNC_SMBUS_PROC_CALL |
+               I2C_FUNC_SMBUS_BLOCK_DATA;
+}
+
+static const struct i2c_algorithm pci1xxxx_i2c_algo = {
+       .master_xfer = pci1xxxx_i2c_xfer,
+       .functionality = pci1xxxx_i2c_get_funcs,
+};
+
+static const struct i2c_adapter_quirks pci1xxxx_i2c_quirks = {
+       .flags = I2C_AQ_NO_ZERO_LEN,
+};
+
+static const struct i2c_adapter pci1xxxx_i2c_ops = {
+       .owner  = THIS_MODULE,
+       .name   = "PCI1xxxx I2C Adapter",
+       .algo   = &pci1xxxx_i2c_algo,
+       .quirks = &pci1xxxx_i2c_quirks,
+};
+
+static int pci1xxxx_i2c_suspend(struct device *dev)
+{
+       struct pci1xxxx_i2c *i2c = dev_get_drvdata(dev);
+       void __iomem *p = i2c->i2c_base + SMBUS_RESET_REG;
+       struct pci_dev *pdev = to_pci_dev(dev);
+       u32 regval;
+
+       i2c_mark_adapter_suspended(&i2c->adap);
+
+       /*
+        * If the system is put into 'suspend' state when the I2C transfer is in
+        * progress, wait until the transfer completes.
+        */
+       while (i2c->i2c_xfer_in_progress)
+               msleep(20);
+
+       pci1xxxx_i2c_config_high_level_intr(i2c, SMBALERT_WAKE_INTR_MASK, true);
+
+       /*
+        * Enable the PERST_DIS bit to mask the PERST from resetting the core
+        * registers.
+        */
+       regval = readl(p);
+       regval |= PERI_SMBUS_D3_RESET_DIS;
+       writel(regval, p);
+
+       /* Enable PCI wake in the PMCSR register. */
+       device_set_wakeup_enable(dev, true);
+       pci_wake_from_d3(pdev, true);
+
+       return 0;
+}
+
+static int pci1xxxx_i2c_resume(struct device *dev)
+{
+       struct pci1xxxx_i2c *i2c = dev_get_drvdata(dev);
+       void __iomem *p1 = i2c->i2c_base + SMBUS_GEN_INT_STAT_REG_OFF;
+       void __iomem *p2 = i2c->i2c_base + SMBUS_RESET_REG;
+       struct pci_dev *pdev = to_pci_dev(dev);
+       u32 regval;
+
+       regval = readw(p1);
+       writew(regval, p1);
+       pci1xxxx_i2c_config_high_level_intr(i2c, SMBALERT_WAKE_INTR_MASK, false);
+       regval = readl(p2);
+       regval &= ~PERI_SMBUS_D3_RESET_DIS;
+       writel(regval, p2);
+       i2c_mark_adapter_resumed(&i2c->adap);
+       pci_wake_from_d3(pdev, false);
+       return 0;
+}
+
+static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_i2c_pm_ops, pci1xxxx_i2c_suspend,
+                        pci1xxxx_i2c_resume);
+
+static void pci1xxxx_i2c_shutdown(struct pci1xxxx_i2c *i2c)
+{
+       pci1xxxx_i2c_config_padctrl(i2c, false);
+       pci1xxxx_i2c_configure_core_reg(i2c, false);
+}
+
+static int pci1xxxx_i2c_probe_pci(struct pci_dev *pdev,
+                                 const struct pci_device_id *ent)
+{
+       struct device *dev = &pdev->dev;
+       struct pci1xxxx_i2c *i2c;
+       int ret;
+
+       i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL);
+       if (!i2c)
+               return -ENOMEM;
+
+       pci_set_drvdata(pdev, i2c);
+       i2c->i2c_xfer_in_progress = false;
+
+       ret = pcim_enable_device(pdev);
+       if (ret)
+               return ret;
+
+       pci_set_master(pdev);
+
+       /*
+        * We are getting the base address of the SMB core. SMB core uses
+        * BAR0 and size is 32K.
+        */
+       ret = pcim_iomap_regions(pdev, BIT(0), pci_name(pdev));
+       if (ret < 0)
+               return ret;
+
+       i2c->i2c_base = pcim_iomap_table(pdev)[0];
+       init_completion(&i2c->i2c_xfer_done);
+       pci1xxxx_i2c_init(i2c);
+
+       ret = devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c);
+       if (ret)
+               return ret;
+
+       ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
+       if (ret < 0)
+               return ret;
+
+       ret = devm_request_irq(dev, pci_irq_vector(pdev, 0), pci1xxxx_i2c_isr,
+                              0, pci_name(pdev), i2c);
+       if (ret)
+               return ret;
+
+       i2c->adap = pci1xxxx_i2c_ops;
+       i2c->adap.dev.parent = dev;
+
+       snprintf(i2c->adap.name, sizeof(i2c->adap.name),
+                "MCHP PCI1xxxx i2c adapter at %s", pci_name(pdev));
+
+       i2c_set_adapdata(&i2c->adap, i2c);
+
+       ret = devm_i2c_add_adapter(dev, &i2c->adap);
+       if (ret)
+               return dev_err_probe(dev, ret, "i2c add adapter failed\n");
+
+       return 0;
+}
+
+static const struct pci_device_id pci1xxxx_i2c_pci_id_table[] = {
+       { PCI_VDEVICE(EFAR, 0xA003) },
+       { PCI_VDEVICE(EFAR, 0xA013) },
+       { PCI_VDEVICE(EFAR, 0xA023) },
+       { PCI_VDEVICE(EFAR, 0xA033) },
+       { PCI_VDEVICE(EFAR, 0xA043) },
+       { }
+};
+MODULE_DEVICE_TABLE(pci, pci1xxxx_i2c_pci_id_table);
+
+static struct pci_driver pci1xxxx_i2c_pci_driver = {
+       .name           = "i2c-mchp-pci1xxxx",
+       .id_table       = pci1xxxx_i2c_pci_id_table,
+       .probe          = pci1xxxx_i2c_probe_pci,
+       .driver = {
+               .pm = pm_sleep_ptr(&pci1xxxx_i2c_pm_ops),
+       },
+};
+module_pci_driver(pci1xxxx_i2c_pci_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Tharun Kumar P<tharunkumar.pasumarthi@microchip.com>");
+MODULE_AUTHOR("Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>");
+MODULE_DESCRIPTION("Microchip Technology Inc. pci1xxxx I2C bus driver");
index 60908c5..e68e775 100644 (file)
@@ -32,8 +32,6 @@
        (MLXBF_I2C_FUNC_SMBUS_DEFAULT | MLXBF_I2C_FUNC_SMBUS_BLOCK | \
         I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SLAVE)
 
-#define MLXBF_I2C_SMBUS_MAX        3
-
 /* Shared resources info in BlueField platforms. */
 
 #define MLXBF_I2C_COALESCE_TYU_ADDR    0x02801300
@@ -48,6 +46,9 @@
 #define MLXBF_I2C_COREPLL_YU_ADDR      0x02800c30
 #define MLXBF_I2C_COREPLL_YU_SIZE      0x00c
 
+#define MLXBF_I2C_COREPLL_RSH_YU_ADDR  0x13409824
+#define MLXBF_I2C_COREPLL_RSH_YU_SIZE  0x00c
+
 #define MLXBF_I2C_SHARED_RES_MAX       3
 
 /*
 /* Slave busy bit reset. */
 #define MLXBF_I2C_CAUSE_S_GW_BUSY_FALL        BIT(18)
 
-#define MLXBF_I2C_CAUSE_SLAVE_ARBITER_BITS_MASK     GENMASK(20, 0)
-
 /* Cause coalesce registers. */
 #define MLXBF_I2C_CAUSE_COALESCE_0        0x00
-#define MLXBF_I2C_CAUSE_COALESCE_1        0x04
-#define MLXBF_I2C_CAUSE_COALESCE_2        0x08
 
-#define MLXBF_I2C_CAUSE_TYU_SLAVE_BIT   MLXBF_I2C_SMBUS_MAX
+#define MLXBF_I2C_CAUSE_TYU_SLAVE_BIT   3
 #define MLXBF_I2C_CAUSE_YU_SLAVE_BIT    1
 
 /* Functional enable register. */
 #define MLXBF_I2C_GPIO_SMBUS_GW_ASSERT_PINS(num, val) \
        ((val) | (0x3 << MLXBF_I2C_GPIO_SMBUS_GW_PINS(num)))
 
-/* SMBus timing parameters. */
-#define MLXBF_I2C_SMBUS_TIMER_SCL_LOW_SCL_HIGH    0x00
-#define MLXBF_I2C_SMBUS_TIMER_FALL_RISE_SPIKE     0x04
-#define MLXBF_I2C_SMBUS_TIMER_THOLD               0x08
-#define MLXBF_I2C_SMBUS_TIMER_TSETUP_START_STOP   0x0c
-#define MLXBF_I2C_SMBUS_TIMER_TSETUP_DATA         0x10
-#define MLXBF_I2C_SMBUS_THIGH_MAX_TBUF            0x14
-#define MLXBF_I2C_SMBUS_SCL_LOW_TIMEOUT           0x18
-
 /*
  * Defines SMBus operating frequency and core clock frequency.
  * According to ADB files, default values are compliant to 100KHz SMBus
 #define MLXBF_I2C_COREPLL_CORE_OD_YU_MASK   GENMASK(3, 0)
 #define MLXBF_I2C_COREPLL_CORE_R_YU_MASK    GENMASK(31, 26)
 
+/* SMBus timing parameters. */
+#define MLXBF_I2C_SMBUS_TIMER_SCL_LOW_SCL_HIGH    0x00
+#define MLXBF_I2C_SMBUS_TIMER_FALL_RISE_SPIKE     0x04
+#define MLXBF_I2C_SMBUS_TIMER_THOLD               0x08
+#define MLXBF_I2C_SMBUS_TIMER_TSETUP_START_STOP   0x0c
+#define MLXBF_I2C_SMBUS_TIMER_TSETUP_DATA         0x10
+#define MLXBF_I2C_SMBUS_THIGH_MAX_TBUF            0x14
+#define MLXBF_I2C_SMBUS_SCL_LOW_TIMEOUT           0x18
 
-/* Core PLL frequency. */
-static u64 mlxbf_i2c_corepll_frequency;
+#define MLXBF_I2C_SHIFT_0   0
+#define MLXBF_I2C_SHIFT_8   8
+#define MLXBF_I2C_SHIFT_16  16
+#define MLXBF_I2C_SHIFT_24  24
+
+#define MLXBF_I2C_MASK_8    GENMASK(7, 0)
+#define MLXBF_I2C_MASK_16   GENMASK(15, 0)
+
+#define MLXBF_I2C_MST_ADDR_OFFSET         0x200
 
 /* SMBus Master GW. */
-#define MLXBF_I2C_SMBUS_MASTER_GW     0x200
+#define MLXBF_I2C_SMBUS_MASTER_GW         0x0
 /* Number of bytes received and sent. */
-#define MLXBF_I2C_SMBUS_RS_BYTES      0x300
+#define MLXBF_I2C_YU_SMBUS_RS_BYTES       0x100
+#define MLXBF_I2C_RSH_YU_SMBUS_RS_BYTES   0x10c
 /* Packet error check (PEC) value. */
-#define MLXBF_I2C_SMBUS_MASTER_PEC    0x304
+#define MLXBF_I2C_SMBUS_MASTER_PEC        0x104
 /* Status bits (ACK/NACK/FW Timeout). */
-#define MLXBF_I2C_SMBUS_MASTER_STATUS 0x308
+#define MLXBF_I2C_SMBUS_MASTER_STATUS     0x108
 /* SMbus Master Finite State Machine. */
-#define MLXBF_I2C_SMBUS_MASTER_FSM    0x310
-
-/*
- * When enabled, the master will issue a stop condition in case of
- * timeout while waiting for FW response.
- */
-#define MLXBF_I2C_SMBUS_EN_FW_TIMEOUT 0x31c
+#define MLXBF_I2C_YU_SMBUS_MASTER_FSM     0x110
+#define MLXBF_I2C_RSH_YU_SMBUS_MASTER_FSM 0x100
 
 /* SMBus master GW control bits offset in MLXBF_I2C_SMBUS_MASTER_GW[31:3]. */
 #define MLXBF_I2C_MASTER_LOCK_BIT         BIT(31) /* Lock bit. */
@@ -231,14 +230,14 @@ static u64 mlxbf_i2c_corepll_frequency;
 #define MLXBF_I2C_MASTER_ENABLE_READ \
        (MLXBF_I2C_MASTER_ENABLE | MLXBF_I2C_MASTER_CTL_READ_BIT)
 
-#define MLXBF_I2C_MASTER_SLV_ADDR_SHIFT   12 /* Slave address shift. */
-#define MLXBF_I2C_MASTER_WRITE_SHIFT      21 /* Control write bytes shift. */
-#define MLXBF_I2C_MASTER_SEND_PEC_SHIFT   20 /* Send PEC byte shift. */
-#define MLXBF_I2C_MASTER_PARSE_EXP_SHIFT  11 /* Parse expected bytes shift. */
-#define MLXBF_I2C_MASTER_READ_SHIFT       4  /* Control read bytes shift. */
+#define MLXBF_I2C_MASTER_WRITE_SHIFT      21 /* Control write bytes */
+#define MLXBF_I2C_MASTER_SEND_PEC_SHIFT   20 /* Send PEC byte when set to 1 */
+#define MLXBF_I2C_MASTER_PARSE_EXP_SHIFT  11 /* Control parse expected bytes */
+#define MLXBF_I2C_MASTER_SLV_ADDR_SHIFT   12 /* Slave address */
+#define MLXBF_I2C_MASTER_READ_SHIFT       4  /* Control read bytes */
 
 /* SMBus master GW Data descriptor. */
-#define MLXBF_I2C_MASTER_DATA_DESC_ADDR   0x280
+#define MLXBF_I2C_MASTER_DATA_DESC_ADDR   0x80
 #define MLXBF_I2C_MASTER_DATA_DESC_SIZE   0x80 /* Size in bytes. */
 
 /* Maximum bytes to read/write per SMBus transaction. */
@@ -264,19 +263,21 @@ static u64 mlxbf_i2c_corepll_frequency;
 #define MLXBF_I2C_SMBUS_MASTER_FSM_STOP_MASK      BIT(31)
 #define MLXBF_I2C_SMBUS_MASTER_FSM_PS_STATE_MASK  BIT(15)
 
+#define MLXBF_I2C_SLV_ADDR_OFFSET             0x400
+
 /* SMBus slave GW. */
-#define MLXBF_I2C_SMBUS_SLAVE_GW              0x400
+#define MLXBF_I2C_SMBUS_SLAVE_GW              0x0
 /* Number of bytes received and sent from/to master. */
-#define MLXBF_I2C_SMBUS_SLAVE_RS_MASTER_BYTES 0x500
+#define MLXBF_I2C_SMBUS_SLAVE_RS_MASTER_BYTES 0x100
 /* Packet error check (PEC) value. */
-#define MLXBF_I2C_SMBUS_SLAVE_PEC             0x504
+#define MLXBF_I2C_SMBUS_SLAVE_PEC             0x104
 /* SMBus slave Finite State Machine (FSM). */
-#define MLXBF_I2C_SMBUS_SLAVE_FSM             0x510
+#define MLXBF_I2C_SMBUS_SLAVE_FSM             0x110
 /*
  * Should be set when all raised causes handled, and cleared by HW on
  * every new cause.
  */
-#define MLXBF_I2C_SMBUS_SLAVE_READY           0x52c
+#define MLXBF_I2C_SMBUS_SLAVE_READY           0x12c
 
 /* SMBus slave GW control bits offset in MLXBF_I2C_SMBUS_SLAVE_GW[31:19]. */
 #define MLXBF_I2C_SLAVE_BUSY_BIT         BIT(30) /* Busy bit. */
@@ -289,23 +290,74 @@ static u64 mlxbf_i2c_corepll_frequency;
 #define MLXBF_I2C_SLAVE_SEND_PEC_SHIFT    21 /* Send PEC byte shift. */
 
 /* SMBus slave GW Data descriptor. */
-#define MLXBF_I2C_SLAVE_DATA_DESC_ADDR   0x480
+#define MLXBF_I2C_SLAVE_DATA_DESC_ADDR   0x80
 #define MLXBF_I2C_SLAVE_DATA_DESC_SIZE   0x80 /* Size in bytes. */
 
 /* SMbus slave configuration registers. */
-#define MLXBF_I2C_SMBUS_SLAVE_ADDR_CFG        0x514
+#define MLXBF_I2C_SMBUS_SLAVE_ADDR_CFG        0x114
 #define MLXBF_I2C_SMBUS_SLAVE_ADDR_CNT        16
-#define MLXBF_I2C_SMBUS_SLAVE_ADDR_EN_BIT     7
+#define MLXBF_I2C_SMBUS_SLAVE_ADDR_EN_BIT     BIT(7)
 #define MLXBF_I2C_SMBUS_SLAVE_ADDR_MASK       GENMASK(6, 0)
 
-#define MLXBF_I2C_SLAVE_ADDR_ENABLED(addr) \
-       ((addr) & (1 << MLXBF_I2C_SMBUS_SLAVE_ADDR_EN_BIT))
-
 /*
  * Timeout is given in microsends. Note also that timeout handling is not
  * exact.
  */
 #define MLXBF_I2C_SMBUS_TIMEOUT   (300 * 1000) /* 300ms */
+#define MLXBF_I2C_SMBUS_LOCK_POLL_TIMEOUT (300 * 1000) /* 300ms */
+
+/* Polling frequency in microseconds. */
+#define MLXBF_I2C_POLL_FREQ_IN_USEC        200
+
+#define MLXBF_I2C_SMBUS_OP_CNT_1   1
+#define MLXBF_I2C_SMBUS_OP_CNT_2   2
+#define MLXBF_I2C_SMBUS_OP_CNT_3   3
+#define MLXBF_I2C_SMBUS_MAX_OP_CNT MLXBF_I2C_SMBUS_OP_CNT_3
+
+/* Helper macro to define an I2C resource parameters. */
+#define MLXBF_I2C_RES_PARAMS(addr, size, str) \
+       { \
+               .start = (addr), \
+               .end = (addr) + (size) - 1, \
+               .name = (str) \
+       }
+
+enum {
+       MLXBF_I2C_TIMING_100KHZ = 100000,
+       MLXBF_I2C_TIMING_400KHZ = 400000,
+       MLXBF_I2C_TIMING_1000KHZ = 1000000,
+};
+
+enum {
+       MLXBF_I2C_F_READ = BIT(0),
+       MLXBF_I2C_F_WRITE = BIT(1),
+       MLXBF_I2C_F_NORESTART = BIT(3),
+       MLXBF_I2C_F_SMBUS_OPERATION = BIT(4),
+       MLXBF_I2C_F_SMBUS_BLOCK = BIT(5),
+       MLXBF_I2C_F_SMBUS_PEC = BIT(6),
+       MLXBF_I2C_F_SMBUS_PROCESS_CALL = BIT(7),
+};
+
+/* Mellanox BlueField chip type. */
+enum mlxbf_i2c_chip_type {
+       MLXBF_I2C_CHIP_TYPE_1, /* Mellanox BlueField-1 chip. */
+       MLXBF_I2C_CHIP_TYPE_2, /* Mellanox BlueField-2 chip. */
+       MLXBF_I2C_CHIP_TYPE_3 /* Mellanox BlueField-3 chip. */
+};
+
+/* List of chip resources that are being accessed by the driver. */
+enum {
+       MLXBF_I2C_SMBUS_RES,
+       MLXBF_I2C_MST_CAUSE_RES,
+       MLXBF_I2C_SLV_CAUSE_RES,
+       MLXBF_I2C_COALESCE_RES,
+       MLXBF_I2C_SMBUS_TIMER_RES,
+       MLXBF_I2C_SMBUS_MST_RES,
+       MLXBF_I2C_SMBUS_SLV_RES,
+       MLXBF_I2C_COREPLL_RES,
+       MLXBF_I2C_GPIO_RES,
+       MLXBF_I2C_END_RES
+};
 
 /* Encapsulates timing parameters. */
 struct mlxbf_i2c_timings {
@@ -326,27 +378,12 @@ struct mlxbf_i2c_timings {
        u32 timeout;            /* Detect clock low timeout. */
 };
 
-enum {
-       MLXBF_I2C_F_READ = BIT(0),
-       MLXBF_I2C_F_WRITE = BIT(1),
-       MLXBF_I2C_F_NORESTART = BIT(3),
-       MLXBF_I2C_F_SMBUS_OPERATION = BIT(4),
-       MLXBF_I2C_F_SMBUS_BLOCK = BIT(5),
-       MLXBF_I2C_F_SMBUS_PEC = BIT(6),
-       MLXBF_I2C_F_SMBUS_PROCESS_CALL = BIT(7),
-};
-
 struct mlxbf_i2c_smbus_operation {
        u32 flags;
        u32 length; /* Buffer length in bytes. */
        u8 *buffer;
 };
 
-#define MLXBF_I2C_SMBUS_OP_CNT_1       1
-#define MLXBF_I2C_SMBUS_OP_CNT_2       2
-#define MLXBF_I2C_SMBUS_OP_CNT_3       3
-#define MLXBF_I2C_SMBUS_MAX_OP_CNT     MLXBF_I2C_SMBUS_OP_CNT_3
-
 struct mlxbf_i2c_smbus_request {
        u8 slave;
        u8 operation_cnt;
@@ -360,24 +397,38 @@ struct mlxbf_i2c_resource {
        u8 type;
 };
 
-/* List of chip resources that are being accessed by the driver. */
-enum {
-       MLXBF_I2C_SMBUS_RES,
-       MLXBF_I2C_MST_CAUSE_RES,
-       MLXBF_I2C_SLV_CAUSE_RES,
-       MLXBF_I2C_COALESCE_RES,
-       MLXBF_I2C_COREPLL_RES,
-       MLXBF_I2C_GPIO_RES,
-       MLXBF_I2C_END_RES,
+struct mlxbf_i2c_chip_info {
+       enum mlxbf_i2c_chip_type type;
+       /* Chip shared resources that are being used by the I2C controller. */
+       struct mlxbf_i2c_resource *shared_res[MLXBF_I2C_SHARED_RES_MAX];
+
+       /* Callback to calculate the core PLL frequency. */
+       u64 (*calculate_freq)(struct mlxbf_i2c_resource *corepll_res);
+
+       /* Registers' address offset */
+       u32 smbus_master_rs_bytes_off;
+       u32 smbus_master_fsm_off;
 };
 
-/* Helper macro to define an I2C resource parameters. */
-#define MLXBF_I2C_RES_PARAMS(addr, size, str) \
-       { \
-               .start = (addr), \
-               .end = (addr) + (size) - 1, \
-               .name = (str) \
-       }
+struct mlxbf_i2c_priv {
+       const struct mlxbf_i2c_chip_info *chip;
+       struct i2c_adapter adap;
+       struct mlxbf_i2c_resource *smbus;
+       struct mlxbf_i2c_resource *timer;
+       struct mlxbf_i2c_resource *mst;
+       struct mlxbf_i2c_resource *slv;
+       struct mlxbf_i2c_resource *mst_cause;
+       struct mlxbf_i2c_resource *slv_cause;
+       struct mlxbf_i2c_resource *coalesce;
+       u64 frequency; /* Core frequency in Hz. */
+       int bus; /* Physical bus identifier. */
+       int irq;
+       struct i2c_client *slave[MLXBF_I2C_SMBUS_SLAVE_ADDR_CNT];
+       u32 resource_version;
+};
+
+/* Core PLL frequency. */
+static u64 mlxbf_i2c_corepll_frequency;
 
 static struct resource mlxbf_i2c_coalesce_tyu_params =
                MLXBF_I2C_RES_PARAMS(MLXBF_I2C_COALESCE_TYU_ADDR,
@@ -391,6 +442,10 @@ static struct resource mlxbf_i2c_corepll_yu_params =
                MLXBF_I2C_RES_PARAMS(MLXBF_I2C_COREPLL_YU_ADDR,
                                     MLXBF_I2C_COREPLL_YU_SIZE,
                                     "COREPLL_MEM");
+static struct resource mlxbf_i2c_corepll_rsh_yu_params =
+               MLXBF_I2C_RES_PARAMS(MLXBF_I2C_COREPLL_RSH_YU_ADDR,
+                                    MLXBF_I2C_COREPLL_RSH_YU_SIZE,
+                                    "COREPLL_MEM");
 static struct resource mlxbf_i2c_gpio_tyu_params =
                MLXBF_I2C_RES_PARAMS(MLXBF_I2C_GPIO_TYU_ADDR,
                                     MLXBF_I2C_GPIO_TYU_SIZE,
@@ -400,34 +455,6 @@ static struct mutex mlxbf_i2c_coalesce_lock;
 static struct mutex mlxbf_i2c_corepll_lock;
 static struct mutex mlxbf_i2c_gpio_lock;
 
-/* Mellanox BlueField chip type. */
-enum mlxbf_i2c_chip_type {
-       MLXBF_I2C_CHIP_TYPE_1, /* Mellanox BlueField-1 chip. */
-       MLXBF_I2C_CHIP_TYPE_2, /* Mallanox BlueField-2 chip. */
-};
-
-struct mlxbf_i2c_chip_info {
-       enum mlxbf_i2c_chip_type type;
-       /* Chip shared resources that are being used by the I2C controller. */
-       struct mlxbf_i2c_resource *shared_res[MLXBF_I2C_SHARED_RES_MAX];
-
-       /* Callback to calculate the core PLL frequency. */
-       u64 (*calculate_freq)(struct mlxbf_i2c_resource *corepll_res);
-};
-
-struct mlxbf_i2c_priv {
-       const struct mlxbf_i2c_chip_info *chip;
-       struct i2c_adapter adap;
-       struct mlxbf_i2c_resource *smbus;
-       struct mlxbf_i2c_resource *mst_cause;
-       struct mlxbf_i2c_resource *slv_cause;
-       struct mlxbf_i2c_resource *coalesce;
-       u64 frequency; /* Core frequency in Hz. */
-       int bus; /* Physical bus identifier. */
-       int irq;
-       struct i2c_client *slave;
-};
-
 static struct mlxbf_i2c_resource mlxbf_i2c_coalesce_res[] = {
        [MLXBF_I2C_CHIP_TYPE_1] = {
                .params = &mlxbf_i2c_coalesce_tyu_params,
@@ -447,6 +474,11 @@ static struct mlxbf_i2c_resource mlxbf_i2c_corepll_res[] = {
                .params = &mlxbf_i2c_corepll_yu_params,
                .lock = &mlxbf_i2c_corepll_lock,
                .type = MLXBF_I2C_COREPLL_RES,
+       },
+       [MLXBF_I2C_CHIP_TYPE_3] = {
+               .params = &mlxbf_i2c_corepll_rsh_yu_params,
+               .lock = &mlxbf_i2c_corepll_lock,
+               .type = MLXBF_I2C_COREPLL_RES,
        }
 };
 
@@ -463,24 +495,13 @@ static u8 mlxbf_i2c_bus_count;
 
 static struct mutex mlxbf_i2c_bus_lock;
 
-/* Polling frequency in microseconds. */
-#define MLXBF_I2C_POLL_FREQ_IN_USEC        200
-
-#define MLXBF_I2C_SHIFT_0   0
-#define MLXBF_I2C_SHIFT_8   8
-#define MLXBF_I2C_SHIFT_16  16
-#define MLXBF_I2C_SHIFT_24  24
-
-#define MLXBF_I2C_MASK_8    GENMASK(7, 0)
-#define MLXBF_I2C_MASK_16   GENMASK(15, 0)
-
 /*
  * Function to poll a set of bits at a specific address; it checks whether
  * the bits are equal to zero when eq_zero is set to 'true', and not equal
  * to zero when eq_zero is set to 'false'.
  * Note that the timeout is given in microseconds.
  */
-static u32 mlxbf_smbus_poll(void __iomem *io, u32 addr, u32 mask,
+static u32 mlxbf_i2c_poll(void __iomem *io, u32 addr, u32 mask,
                            bool eq_zero, u32  timeout)
 {
        u32 bits;
@@ -502,18 +523,37 @@ static u32 mlxbf_smbus_poll(void __iomem *io, u32 addr, u32 mask,
  * a transaction. Accordingly, this function polls the Master FSM stop
  * bit; it returns false when the bit is asserted, true if not.
  */
-static bool mlxbf_smbus_master_wait_for_idle(struct mlxbf_i2c_priv *priv)
+static bool mlxbf_i2c_smbus_master_wait_for_idle(struct mlxbf_i2c_priv *priv)
 {
        u32 mask = MLXBF_I2C_SMBUS_MASTER_FSM_STOP_MASK;
-       u32 addr = MLXBF_I2C_SMBUS_MASTER_FSM;
+       u32 addr = priv->chip->smbus_master_fsm_off;
        u32 timeout = MLXBF_I2C_SMBUS_TIMEOUT;
 
-       if (mlxbf_smbus_poll(priv->smbus->io, addr, mask, true, timeout))
+       if (mlxbf_i2c_poll(priv->mst->io, addr, mask, true, timeout))
+               return true;
+
+       return false;
+}
+
+/*
+ * wait for the lock to be released before acquiring it.
+ */
+static bool mlxbf_i2c_smbus_master_lock(struct mlxbf_i2c_priv *priv)
+{
+       if (mlxbf_i2c_poll(priv->mst->io, MLXBF_I2C_SMBUS_MASTER_GW,
+                          MLXBF_I2C_MASTER_LOCK_BIT, true,
+                          MLXBF_I2C_SMBUS_LOCK_POLL_TIMEOUT))
                return true;
 
        return false;
 }
 
+static void mlxbf_i2c_smbus_master_unlock(struct mlxbf_i2c_priv *priv)
+{
+       /* Clear the gw to clear the lock */
+       writel(0, priv->mst->io + MLXBF_I2C_SMBUS_MASTER_GW);
+}
+
 static bool mlxbf_i2c_smbus_transaction_success(u32 master_status,
                                                u32 cause_status)
 {
@@ -551,7 +591,7 @@ static int mlxbf_i2c_smbus_check_status(struct mlxbf_i2c_priv *priv)
         * then read the cause and master status bits to determine if
         * errors occurred during the transaction.
         */
-       mlxbf_smbus_poll(priv->smbus->io, MLXBF_I2C_SMBUS_MASTER_GW,
+       mlxbf_i2c_poll(priv->mst->io, MLXBF_I2C_SMBUS_MASTER_GW,
                         MLXBF_I2C_MASTER_BUSY_BIT, true,
                         MLXBF_I2C_SMBUS_TIMEOUT);
 
@@ -564,7 +604,7 @@ static int mlxbf_i2c_smbus_check_status(struct mlxbf_i2c_priv *priv)
         * Parse both Cause and Master GW bits, then return transaction status.
         */
 
-       master_status_bits = readl(priv->smbus->io +
+       master_status_bits = readl(priv->mst->io +
                                        MLXBF_I2C_SMBUS_MASTER_STATUS);
        master_status_bits &= MLXBF_I2C_SMBUS_MASTER_STATUS_MASK;
 
@@ -589,7 +629,8 @@ static int mlxbf_i2c_smbus_check_status(struct mlxbf_i2c_priv *priv)
 }
 
 static void mlxbf_i2c_smbus_write_data(struct mlxbf_i2c_priv *priv,
-                                      const u8 *data, u8 length, u32 addr)
+                                      const u8 *data, u8 length, u32 addr,
+                                      bool is_master)
 {
        u8 offset, aligned_length;
        u32 data32;
@@ -606,12 +647,16 @@ static void mlxbf_i2c_smbus_write_data(struct mlxbf_i2c_priv *priv,
         */
        for (offset = 0; offset < aligned_length; offset += sizeof(u32)) {
                data32 = *((u32 *)(data + offset));
-               iowrite32be(data32, priv->smbus->io + addr + offset);
+               if (is_master)
+                       iowrite32be(data32, priv->mst->io + addr + offset);
+               else
+                       iowrite32be(data32, priv->slv->io + addr + offset);
        }
 }
 
 static void mlxbf_i2c_smbus_read_data(struct mlxbf_i2c_priv *priv,
-                                     u8 *data, u8 length, u32 addr)
+                                     u8 *data, u8 length, u32 addr,
+                                     bool is_master)
 {
        u32 data32, mask;
        u8 byte, offset;
@@ -627,14 +672,20 @@ static void mlxbf_i2c_smbus_read_data(struct mlxbf_i2c_priv *priv,
         */
 
        for (offset = 0; offset < (length & ~mask); offset += sizeof(u32)) {
-               data32 = ioread32be(priv->smbus->io + addr + offset);
+               if (is_master)
+                       data32 = ioread32be(priv->mst->io + addr + offset);
+               else
+                       data32 = ioread32be(priv->slv->io + addr + offset);
                *((u32 *)(data + offset)) = data32;
        }
 
        if (!(length & mask))
                return;
 
-       data32 = ioread32be(priv->smbus->io + addr + offset);
+       if (is_master)
+               data32 = ioread32be(priv->mst->io + addr + offset);
+       else
+               data32 = ioread32be(priv->slv->io + addr + offset);
 
        for (byte = 0; byte < (length & mask); byte++) {
                data[offset + byte] = data32 & GENMASK(7, 0);
@@ -660,16 +711,16 @@ static int mlxbf_i2c_smbus_enable(struct mlxbf_i2c_priv *priv, u8 slave,
        command |= rol32(pec_en, MLXBF_I2C_MASTER_SEND_PEC_SHIFT);
 
        /* Clear status bits. */
-       writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_STATUS);
+       writel(0x0, priv->mst->io + MLXBF_I2C_SMBUS_MASTER_STATUS);
        /* Set the cause data. */
        writel(~0x0, priv->mst_cause->io + MLXBF_I2C_CAUSE_OR_CLEAR);
        /* Zero PEC byte. */
-       writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_PEC);
+       writel(0x0, priv->mst->io + MLXBF_I2C_SMBUS_MASTER_PEC);
        /* Zero byte count. */
-       writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_RS_BYTES);
+       writel(0x0, priv->mst->io + priv->chip->smbus_master_rs_bytes_off);
 
        /* GW activation. */
-       writel(command, priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_GW);
+       writel(command, priv->mst->io + MLXBF_I2C_SMBUS_MASTER_GW);
 
        /*
         * Poll master status and check status bits. An ACK is sent when
@@ -705,10 +756,19 @@ mlxbf_i2c_smbus_start_transaction(struct mlxbf_i2c_priv *priv,
        slave = request->slave & GENMASK(6, 0);
        addr = slave << 1;
 
-       /* First of all, check whether the HW is idle. */
-       if (WARN_ON(!mlxbf_smbus_master_wait_for_idle(priv)))
+       /*
+        * Try to acquire the smbus gw lock before any reads of the GW register since
+        * a read sets the lock.
+        */
+       if (WARN_ON(!mlxbf_i2c_smbus_master_lock(priv)))
                return -EBUSY;
 
+       /* Check whether the HW is idle */
+       if (WARN_ON(!mlxbf_i2c_smbus_master_wait_for_idle(priv))) {
+               ret = -EBUSY;
+               goto out_unlock;
+       }
+
        /* Set first byte. */
        data_desc[data_idx++] = addr;
 
@@ -732,8 +792,10 @@ mlxbf_i2c_smbus_start_transaction(struct mlxbf_i2c_priv *priv,
                        write_en = 1;
                        write_len += operation->length;
                        if (data_idx + operation->length >
-                                       MLXBF_I2C_MASTER_DATA_DESC_SIZE)
-                               return -ENOBUFS;
+                                       MLXBF_I2C_MASTER_DATA_DESC_SIZE) {
+                               ret = -ENOBUFS;
+                               goto out_unlock;
+                       }
                        memcpy(data_desc + data_idx,
                               operation->buffer, operation->length);
                        data_idx += operation->length;
@@ -759,25 +821,25 @@ mlxbf_i2c_smbus_start_transaction(struct mlxbf_i2c_priv *priv,
         * must be written to the data registers.
         */
        mlxbf_i2c_smbus_write_data(priv, (const u8 *)data_desc, data_len,
-                                  MLXBF_I2C_MASTER_DATA_DESC_ADDR);
+                                  MLXBF_I2C_MASTER_DATA_DESC_ADDR, true);
 
        if (write_en) {
                ret = mlxbf_i2c_smbus_enable(priv, slave, write_len, block_en,
                                         pec_en, 0);
                if (ret)
-                       return ret;
+                       goto out_unlock;
        }
 
        if (read_en) {
                /* Write slave address to Master GW data descriptor. */
                mlxbf_i2c_smbus_write_data(priv, (const u8 *)&addr, 1,
-                                          MLXBF_I2C_MASTER_DATA_DESC_ADDR);
+                                          MLXBF_I2C_MASTER_DATA_DESC_ADDR, true);
                ret = mlxbf_i2c_smbus_enable(priv, slave, read_len, block_en,
                                         pec_en, 1);
                if (!ret) {
                        /* Get Master GW data descriptor. */
                        mlxbf_i2c_smbus_read_data(priv, data_desc, read_len + 1,
-                                            MLXBF_I2C_MASTER_DATA_DESC_ADDR);
+                                            MLXBF_I2C_MASTER_DATA_DESC_ADDR, true);
 
                        /* Get data from Master GW data descriptor. */
                        memcpy(read_buf, data_desc, read_len + 1);
@@ -789,9 +851,12 @@ mlxbf_i2c_smbus_start_transaction(struct mlxbf_i2c_priv *priv,
                 * next tag integration.
                 */
                writel(MLXBF_I2C_SMBUS_MASTER_FSM_PS_STATE_MASK,
-                       priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_FSM);
+                       priv->mst->io + priv->chip->smbus_master_fsm_off);
        }
 
+out_unlock:
+       mlxbf_i2c_smbus_master_unlock(priv);
+
        return ret;
 }
 
@@ -1078,7 +1143,7 @@ static void mlxbf_i2c_set_timings(struct mlxbf_i2c_priv *priv,
        timer |= mlxbf_i2c_set_timer(priv, timings->scl_low,
                                     false, MLXBF_I2C_MASK_16,
                                     MLXBF_I2C_SHIFT_16);
-       writel(timer, priv->smbus->io +
+       writel(timer, priv->timer->io +
                MLXBF_I2C_SMBUS_TIMER_SCL_LOW_SCL_HIGH);
 
        timer = mlxbf_i2c_set_timer(priv, timings->sda_rise, false,
@@ -1089,34 +1154,34 @@ static void mlxbf_i2c_set_timings(struct mlxbf_i2c_priv *priv,
                                     MLXBF_I2C_MASK_8, MLXBF_I2C_SHIFT_16);
        timer |= mlxbf_i2c_set_timer(priv, timings->scl_fall, false,
                                     MLXBF_I2C_MASK_8, MLXBF_I2C_SHIFT_24);
-       writel(timer, priv->smbus->io +
+       writel(timer, priv->timer->io +
                MLXBF_I2C_SMBUS_TIMER_FALL_RISE_SPIKE);
 
        timer = mlxbf_i2c_set_timer(priv, timings->hold_start, true,
                                    MLXBF_I2C_MASK_16, MLXBF_I2C_SHIFT_0);
        timer |= mlxbf_i2c_set_timer(priv, timings->hold_data, true,
                                     MLXBF_I2C_MASK_16, MLXBF_I2C_SHIFT_16);
-       writel(timer, priv->smbus->io + MLXBF_I2C_SMBUS_TIMER_THOLD);
+       writel(timer, priv->timer->io + MLXBF_I2C_SMBUS_TIMER_THOLD);
 
        timer = mlxbf_i2c_set_timer(priv, timings->setup_start, true,
                                    MLXBF_I2C_MASK_16, MLXBF_I2C_SHIFT_0);
        timer |= mlxbf_i2c_set_timer(priv, timings->setup_stop, true,
                                     MLXBF_I2C_MASK_16, MLXBF_I2C_SHIFT_16);
-       writel(timer, priv->smbus->io +
+       writel(timer, priv->timer->io +
                MLXBF_I2C_SMBUS_TIMER_TSETUP_START_STOP);
 
        timer = mlxbf_i2c_set_timer(priv, timings->setup_data, true,
                                    MLXBF_I2C_MASK_16, MLXBF_I2C_SHIFT_0);
-       writel(timer, priv->smbus->io + MLXBF_I2C_SMBUS_TIMER_TSETUP_DATA);
+       writel(timer, priv->timer->io + MLXBF_I2C_SMBUS_TIMER_TSETUP_DATA);
 
        timer = mlxbf_i2c_set_timer(priv, timings->buf, false,
                                    MLXBF_I2C_MASK_16, MLXBF_I2C_SHIFT_0);
        timer |= mlxbf_i2c_set_timer(priv, timings->thigh_max, false,
                                     MLXBF_I2C_MASK_16, MLXBF_I2C_SHIFT_16);
-       writel(timer, priv->smbus->io + MLXBF_I2C_SMBUS_THIGH_MAX_TBUF);
+       writel(timer, priv->timer->io + MLXBF_I2C_SMBUS_THIGH_MAX_TBUF);
 
        timer = timings->timeout;
-       writel(timer, priv->smbus->io + MLXBF_I2C_SMBUS_SCL_LOW_TIMEOUT);
+       writel(timer, priv->timer->io + MLXBF_I2C_SMBUS_SCL_LOW_TIMEOUT);
 }
 
 enum mlxbf_i2c_timings_config {
@@ -1509,28 +1574,26 @@ static int mlxbf_i2c_calculate_corepll_freq(struct platform_device *pdev,
        return 0;
 }
 
-static int mlxbf_slave_enable(struct mlxbf_i2c_priv *priv, u8 addr)
+static int mlxbf_i2c_slave_enable(struct mlxbf_i2c_priv *priv,
+                             struct i2c_client *slave)
 {
-       u32 slave_reg, slave_reg_tmp, slave_reg_avail, slave_addr_mask;
-       u8 reg, reg_cnt, byte, addr_tmp, reg_avail, byte_avail;
-       bool avail, disabled;
-
-       disabled = false;
-       avail = false;
+       u8 reg, reg_cnt, byte, addr_tmp;
+       u32 slave_reg, slave_reg_tmp;
 
        if (!priv)
                return -EPERM;
 
        reg_cnt = MLXBF_I2C_SMBUS_SLAVE_ADDR_CNT >> 2;
-       slave_addr_mask = MLXBF_I2C_SMBUS_SLAVE_ADDR_MASK;
 
        /*
         * Read the slave registers. There are 4 * 32-bit slave registers.
-        * Each slave register can hold up to 4 * 8-bit slave configuration
-        * (7-bit address, 1 status bit (1 if enabled, 0 if not)).
+        * Each slave register can hold up to 4 * 8-bit slave configuration:
+        * 1) A 7-bit address
+        * 2) And a status bit (1 if enabled, 0 if not).
+        * Look for the next available slave register slot.
         */
        for (reg = 0; reg < reg_cnt; reg++) {
-               slave_reg = readl(priv->smbus->io +
+               slave_reg = readl(priv->slv->io +
                                MLXBF_I2C_SMBUS_SLAVE_ADDR_CFG + reg * 0x4);
                /*
                 * Each register holds 4 slave addresses. So, we have to keep
@@ -1542,121 +1605,87 @@ static int mlxbf_slave_enable(struct mlxbf_i2c_priv *priv, u8 addr)
                        addr_tmp = slave_reg_tmp & GENMASK(7, 0);
 
                        /*
-                        * Mark the first available slave address slot, i.e. its
-                        * enabled bit should be unset. This slot might be used
-                        * later on to register our slave.
+                        * If an enable bit is not set in the
+                        * MLXBF_I2C_SMBUS_SLAVE_ADDR_CFG register, then the
+                        * slave address slot associated with that bit is
+                        * free. So set the enable bit and write the
+                        * slave address bits.
                         */
-                       if (!avail && !MLXBF_I2C_SLAVE_ADDR_ENABLED(addr_tmp)) {
-                               avail = true;
-                               reg_avail = reg;
-                               byte_avail = byte;
-                               slave_reg_avail = slave_reg;
-                       }
-
-                       /*
-                        * Parse slave address bytes and check whether the
-                        * slave address already exists and it's enabled,
-                        * i.e. most significant bit is set.
-                        */
-                       if ((addr_tmp & slave_addr_mask) == addr) {
-                               if (MLXBF_I2C_SLAVE_ADDR_ENABLED(addr_tmp))
-                                       return 0;
-                               disabled = true;
-                               break;
+                       if (!(addr_tmp & MLXBF_I2C_SMBUS_SLAVE_ADDR_EN_BIT)) {
+                               slave_reg &= ~(MLXBF_I2C_SMBUS_SLAVE_ADDR_MASK << (byte * 8));
+                               slave_reg |= (slave->addr << (byte * 8));
+                               slave_reg |= MLXBF_I2C_SMBUS_SLAVE_ADDR_EN_BIT << (byte * 8);
+                               writel(slave_reg, priv->slv->io +
+                                       MLXBF_I2C_SMBUS_SLAVE_ADDR_CFG +
+                                       (reg * 0x4));
+
+                               /*
+                                * Set the slave at the corresponding index.
+                                */
+                               priv->slave[(reg * 4) + byte] = slave;
+
+                               return 0;
                        }
 
                        /* Parse next byte. */
                        slave_reg_tmp >>= 8;
                }
-
-               /* Exit the loop if the slave address is found. */
-               if (disabled)
-                       break;
-       }
-
-       if (!avail && !disabled)
-               return -EINVAL; /* No room for a new slave address. */
-
-       if (avail && !disabled) {
-               reg = reg_avail;
-               byte = byte_avail;
-               /* Set the slave address. */
-               slave_reg_avail &= ~(slave_addr_mask << (byte * 8));
-               slave_reg_avail |= addr << (byte * 8);
-               slave_reg = slave_reg_avail;
        }
 
-       /* Enable the slave address and update the register. */
-       slave_reg |= (1 << MLXBF_I2C_SMBUS_SLAVE_ADDR_EN_BIT) << (byte * 8);
-       writel(slave_reg, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_ADDR_CFG +
-               reg * 0x4);
-
-       return 0;
+       return -EBUSY;
 }
 
-static int mlxbf_slave_disable(struct mlxbf_i2c_priv *priv)
+static int mlxbf_i2c_slave_disable(struct mlxbf_i2c_priv *priv, u8 addr)
 {
-       u32 slave_reg, slave_reg_tmp, slave_addr_mask;
-       u8 addr, addr_tmp, reg, reg_cnt, slave_byte;
-       struct i2c_client *client = priv->slave;
-       bool exist;
-
-       exist = false;
+       u8 addr_tmp, reg, reg_cnt, byte;
+       u32 slave_reg, slave_reg_tmp;
 
-       addr = client->addr;
        reg_cnt = MLXBF_I2C_SMBUS_SLAVE_ADDR_CNT >> 2;
-       slave_addr_mask = MLXBF_I2C_SMBUS_SLAVE_ADDR_MASK;
 
        /*
         * Read the slave registers. There are 4 * 32-bit slave registers.
-        * Each slave register can hold up to 4 * 8-bit slave configuration
-        * (7-bit address, 1 status bit (1 if enabled, 0 if not)).
+        * Each slave register can hold up to 4 * 8-bit slave configuration:
+        * 1) A 7-bit address
+        * 2) And a status bit (1 if enabled, 0 if not).
+        * Check if addr is present in the registers.
         */
        for (reg = 0; reg < reg_cnt; reg++) {
-               slave_reg = readl(priv->smbus->io +
+               slave_reg = readl(priv->slv->io +
                                MLXBF_I2C_SMBUS_SLAVE_ADDR_CFG + reg * 0x4);
 
                /* Check whether the address slots are empty. */
-               if (slave_reg == 0)
+               if (!slave_reg)
                        continue;
 
                /*
-                * Each register holds 4 slave addresses. So, we have to keep
-                * the byte order consistent with the value read in order to
-                * update the register correctly, if needed.
+                * Check if addr matches any of the 4 slave addresses
+                * in the register.
                 */
                slave_reg_tmp = slave_reg;
-               slave_byte = 0;
-               while (slave_reg_tmp != 0) {
-                       addr_tmp = slave_reg_tmp & slave_addr_mask;
+               for (byte = 0; byte < 4; byte++) {
+                       addr_tmp = slave_reg_tmp & MLXBF_I2C_SMBUS_SLAVE_ADDR_MASK;
                        /*
                         * Parse slave address bytes and check whether the
                         * slave address already exists.
                         */
                        if (addr_tmp == addr) {
-                               exist = true;
-                               break;
+                               /* Clear the slave address slot. */
+                               slave_reg &= ~(GENMASK(7, 0) << (byte * 8));
+                               writel(slave_reg, priv->slv->io +
+                                       MLXBF_I2C_SMBUS_SLAVE_ADDR_CFG +
+                                       (reg * 0x4));
+                               /* Free slave at the corresponding index */
+                               priv->slave[(reg * 4) + byte] = NULL;
+
+                               return 0;
                        }
 
                        /* Parse next byte. */
                        slave_reg_tmp >>= 8;
-                       slave_byte += 1;
                }
-
-               /* Exit the loop if the slave address is found. */
-               if (exist)
-                       break;
        }
 
-       if (!exist)
-               return 0; /* Slave is not registered, nothing to do. */
-
-       /* Cleanup the slave address slot. */
-       slave_reg &= ~(GENMASK(7, 0) << (slave_byte * 8));
-       writel(slave_reg, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_ADDR_CFG +
-               reg * 0x4);
-
-       return 0;
+       return -ENXIO;
 }
 
 static int mlxbf_i2c_init_coalesce(struct platform_device *pdev,
@@ -1746,7 +1775,7 @@ static int mlxbf_i2c_init_slave(struct platform_device *pdev,
        int ret;
 
        /* Reset FSM. */
-       writel(0, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_FSM);
+       writel(0, priv->slv->io + MLXBF_I2C_SMBUS_SLAVE_FSM);
 
        /*
         * Enable slave cause interrupt bits. Drive
@@ -1761,7 +1790,7 @@ static int mlxbf_i2c_init_slave(struct platform_device *pdev,
        writel(int_reg, priv->slv_cause->io + MLXBF_I2C_CAUSE_OR_EVTEN0);
 
        /* Finally, set the 'ready' bit to start handling transactions. */
-       writel(0x1, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_READY);
+       writel(0x1, priv->slv->io + MLXBF_I2C_SMBUS_SLAVE_READY);
 
        /* Initialize the cause coalesce resource. */
        ret = mlxbf_i2c_init_coalesce(pdev, priv);
@@ -1806,84 +1835,93 @@ static bool mlxbf_i2c_has_coalesce(struct mlxbf_i2c_priv *priv, bool *read,
        return true;
 }
 
-static bool mlxbf_smbus_slave_wait_for_idle(struct mlxbf_i2c_priv *priv,
+static bool mlxbf_i2c_slave_wait_for_idle(struct mlxbf_i2c_priv *priv,
                                            u32 timeout)
 {
        u32 mask = MLXBF_I2C_CAUSE_S_GW_BUSY_FALL;
        u32 addr = MLXBF_I2C_CAUSE_ARBITER;
 
-       if (mlxbf_smbus_poll(priv->slv_cause->io, addr, mask, false, timeout))
+       if (mlxbf_i2c_poll(priv->slv_cause->io, addr, mask, false, timeout))
                return true;
 
        return false;
 }
 
-/* Send byte to 'external' smbus master. */
-static int mlxbf_smbus_irq_send(struct mlxbf_i2c_priv *priv, u8 recv_bytes)
+static struct i2c_client *mlxbf_i2c_get_slave_from_addr(
+                       struct mlxbf_i2c_priv *priv, u8 addr)
 {
-       u8 data_desc[MLXBF_I2C_SLAVE_DATA_DESC_SIZE] = { 0 };
-       u8 write_size, pec_en, addr, byte, value, byte_cnt, desc_size;
-       struct i2c_client *slave = priv->slave;
-       u32 control32, data32;
-       int ret;
+       int i;
 
-       if (!slave)
-               return -EINVAL;
+       for (i = 0; i < MLXBF_I2C_SMBUS_SLAVE_ADDR_CNT; i++) {
+               if (!priv->slave[i])
+                       continue;
 
-       addr = 0;
-       byte = 0;
-       desc_size = MLXBF_I2C_SLAVE_DATA_DESC_SIZE;
+               if (priv->slave[i]->addr == addr)
+                       return priv->slave[i];
+       }
+
+       return NULL;
+}
+
+/*
+ * Send byte to 'external' smbus master. This function is executed when
+ * an external smbus master wants to read data from the BlueField.
+ */
+static int mlxbf_i2c_irq_send(struct mlxbf_i2c_priv *priv, u8 recv_bytes)
+{
+       u8 data_desc[MLXBF_I2C_SLAVE_DATA_DESC_SIZE] = { 0 };
+       u8 write_size, pec_en, addr, value, byte_cnt;
+       struct i2c_client *slave;
+       u32 control32, data32;
+       int ret = 0;
 
        /*
-        * Read bytes received from the external master. These bytes should
-        * be located in the first data descriptor register of the slave GW.
-        * These bytes are the slave address byte and the internal register
-        * address, if supplied.
+        * Read the first byte received from the external master to
+        * determine the slave address. This byte is located in the
+        * first data descriptor register of the slave GW.
         */
-       if (recv_bytes > 0) {
-               data32 = ioread32be(priv->smbus->io +
-                                       MLXBF_I2C_SLAVE_DATA_DESC_ADDR);
-
-               /* Parse the received bytes. */
-               switch (recv_bytes) {
-               case 2:
-                       byte = (data32 >> 8) & GENMASK(7, 0);
-                       fallthrough;
-               case 1:
-                       addr = (data32 & GENMASK(7, 0)) >> 1;
-               }
+       data32 = ioread32be(priv->slv->io +
+                               MLXBF_I2C_SLAVE_DATA_DESC_ADDR);
+       addr = (data32 & GENMASK(7, 0)) >> 1;
 
-               /* Check whether it's our slave address. */
-               if (slave->addr != addr)
-                       return -EINVAL;
+       /*
+        * Check if the slave address received in the data descriptor register
+        * matches any of the slave addresses registered. If there is a match,
+        * set the slave.
+        */
+       slave = mlxbf_i2c_get_slave_from_addr(priv, addr);
+       if (!slave) {
+               ret = -ENXIO;
+               goto clear_csr;
        }
 
        /*
-        * I2C read transactions may start by a WRITE followed by a READ.
-        * Indeed, most slave devices would expect the internal address
-        * following the slave address byte. So, write that byte first,
-        * and then, send the requested data bytes to the master.
+        * An I2C read can consist of a WRITE bit transaction followed by
+        * a READ bit transaction. Indeed, slave devices often expect
+        * the slave address to be followed by the internal address.
+        * So, write the internal address byte first, and then, send the
+        * requested data to the master.
         */
        if (recv_bytes > 1) {
                i2c_slave_event(slave, I2C_SLAVE_WRITE_REQUESTED, &value);
-               value = byte;
+               value = (data32 >> 8) & GENMASK(7, 0);
                ret = i2c_slave_event(slave, I2C_SLAVE_WRITE_RECEIVED,
                                      &value);
                i2c_slave_event(slave, I2C_SLAVE_STOP, &value);
 
                if (ret < 0)
-                       return ret;
+                       goto clear_csr;
        }
 
        /*
-        * Now, send data to the master; currently, the driver supports
-        * READ_BYTE, READ_WORD and BLOCK READ protocols. Note that the
-        * hardware can send up to 128 bytes per transfer. That is the
-        * size of its data registers.
+        * Send data to the master. Currently, the driver supports
+        * READ_BYTE, READ_WORD and BLOCK READ protocols. The
+        * hardware can send up to 128 bytes per transfer which is
+        * the total size of the data registers.
         */
        i2c_slave_event(slave, I2C_SLAVE_READ_REQUESTED, &value);
 
-       for (byte_cnt = 0; byte_cnt < desc_size; byte_cnt++) {
+       for (byte_cnt = 0; byte_cnt < MLXBF_I2C_SLAVE_DATA_DESC_SIZE; byte_cnt++) {
                data_desc[byte_cnt] = value;
                i2c_slave_event(slave, I2C_SLAVE_READ_PROCESSED, &value);
        }
@@ -1891,14 +1929,12 @@ static int mlxbf_smbus_irq_send(struct mlxbf_i2c_priv *priv, u8 recv_bytes)
        /* Send a stop condition to the backend. */
        i2c_slave_event(slave, I2C_SLAVE_STOP, &value);
 
-       /* Handle the actual transfer. */
-
        /* Set the number of bytes to write to master. */
        write_size = (byte_cnt - 1) & 0x7f;
 
        /* Write data to Slave GW data descriptor. */
        mlxbf_i2c_smbus_write_data(priv, data_desc, byte_cnt,
-                                  MLXBF_I2C_SLAVE_DATA_DESC_ADDR);
+                                  MLXBF_I2C_SLAVE_DATA_DESC_ADDR, false);
 
        pec_en = 0; /* Disable PEC since it is not supported. */
 
@@ -1907,46 +1943,52 @@ static int mlxbf_smbus_irq_send(struct mlxbf_i2c_priv *priv, u8 recv_bytes)
        control32 |= rol32(write_size, MLXBF_I2C_SLAVE_WRITE_BYTES_SHIFT);
        control32 |= rol32(pec_en, MLXBF_I2C_SLAVE_SEND_PEC_SHIFT);
 
-       writel(control32, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_GW);
+       writel(control32, priv->slv->io + MLXBF_I2C_SMBUS_SLAVE_GW);
 
        /*
         * Wait until the transfer is completed; the driver will wait
         * until the GW is idle, a cause will rise on fall of GW busy.
         */
-       mlxbf_smbus_slave_wait_for_idle(priv, MLXBF_I2C_SMBUS_TIMEOUT);
+       mlxbf_i2c_slave_wait_for_idle(priv, MLXBF_I2C_SMBUS_TIMEOUT);
 
+clear_csr:
        /* Release the Slave GW. */
-       writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_RS_MASTER_BYTES);
-       writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_PEC);
-       writel(0x1, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_READY);
+       writel(0x0, priv->slv->io + MLXBF_I2C_SMBUS_SLAVE_RS_MASTER_BYTES);
+       writel(0x0, priv->slv->io + MLXBF_I2C_SMBUS_SLAVE_PEC);
+       writel(0x1, priv->slv->io + MLXBF_I2C_SMBUS_SLAVE_READY);
 
-       return 0;
+       return ret;
 }
 
-/* Receive bytes from 'external' smbus master. */
-static int mlxbf_smbus_irq_recv(struct mlxbf_i2c_priv *priv, u8 recv_bytes)
+/*
+ * Receive bytes from 'external' smbus master. This function is executed when
+ * an external smbus master wants to write data to the BlueField.
+ */
+static int mlxbf_i2c_irq_recv(struct mlxbf_i2c_priv *priv, u8 recv_bytes)
 {
        u8 data_desc[MLXBF_I2C_SLAVE_DATA_DESC_SIZE] = { 0 };
-       struct i2c_client *slave = priv->slave;
+       struct i2c_client *slave;
        u8 value, byte, addr;
        int ret = 0;
 
-       if (!slave)
-               return -EINVAL;
-
        /* Read data from Slave GW data descriptor. */
        mlxbf_i2c_smbus_read_data(priv, data_desc, recv_bytes,
-                                 MLXBF_I2C_SLAVE_DATA_DESC_ADDR);
-
-       /* Check whether its our slave address. */
+                                 MLXBF_I2C_SLAVE_DATA_DESC_ADDR, false);
        addr = data_desc[0] >> 1;
-       if (slave->addr != addr)
-               return -EINVAL;
 
        /*
-        * Notify the slave backend; another I2C master wants to write data
-        * to us. This event is sent once the slave address and the write bit
-        * is detected.
+        * Check if the slave address received in the data descriptor register
+        * matches any of the slave addresses registered.
+        */
+       slave = mlxbf_i2c_get_slave_from_addr(priv, addr);
+       if (!slave) {
+               ret = -EINVAL;
+               goto clear_csr;
+       }
+
+       /*
+        * Notify the slave backend that an smbus master wants to write data
+        * to the BlueField.
         */
        i2c_slave_event(slave, I2C_SLAVE_WRITE_REQUESTED, &value);
 
@@ -1959,18 +2001,22 @@ static int mlxbf_smbus_irq_recv(struct mlxbf_i2c_priv *priv, u8 recv_bytes)
                        break;
        }
 
-       /* Send a stop condition to the backend. */
+       /*
+        * Send a stop event to the slave backend, to signal
+        * the end of the write transactions.
+        */
        i2c_slave_event(slave, I2C_SLAVE_STOP, &value);
 
+clear_csr:
        /* Release the Slave GW. */
-       writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_RS_MASTER_BYTES);
-       writel(0x0, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_PEC);
-       writel(0x1, priv->smbus->io + MLXBF_I2C_SMBUS_SLAVE_READY);
+       writel(0x0, priv->slv->io + MLXBF_I2C_SMBUS_SLAVE_RS_MASTER_BYTES);
+       writel(0x0, priv->slv->io + MLXBF_I2C_SMBUS_SLAVE_PEC);
+       writel(0x1, priv->slv->io + MLXBF_I2C_SMBUS_SLAVE_READY);
 
        return ret;
 }
 
-static irqreturn_t mlxbf_smbus_irq(int irq, void *ptr)
+static irqreturn_t mlxbf_i2c_irq(int irq, void *ptr)
 {
        struct mlxbf_i2c_priv *priv = ptr;
        bool read, write, irq_is_set;
@@ -2000,7 +2046,7 @@ static irqreturn_t mlxbf_smbus_irq(int irq, void *ptr)
         * slave, if the higher 8 bits are sent then the slave expect N bytes
         * from the master.
         */
-       rw_bytes_reg = readl(priv->smbus->io +
+       rw_bytes_reg = readl(priv->slv->io +
                                MLXBF_I2C_SMBUS_SLAVE_RS_MASTER_BYTES);
        recv_bytes = (rw_bytes_reg >> 8) & GENMASK(7, 0);
 
@@ -2018,9 +2064,9 @@ static irqreturn_t mlxbf_smbus_irq(int irq, void *ptr)
                MLXBF_I2C_SLAVE_DATA_DESC_SIZE : recv_bytes;
 
        if (read)
-               mlxbf_smbus_irq_send(priv, recv_bytes);
+               mlxbf_i2c_irq_send(priv, recv_bytes);
        else
-               mlxbf_smbus_irq_recv(priv, recv_bytes);
+               mlxbf_i2c_irq_recv(priv, recv_bytes);
 
        return IRQ_HANDLED;
 }
@@ -2115,23 +2161,21 @@ static s32 mlxbf_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr,
 static int mlxbf_i2c_reg_slave(struct i2c_client *slave)
 {
        struct mlxbf_i2c_priv *priv = i2c_get_adapdata(slave->adapter);
+       struct device *dev = &slave->dev;
        int ret;
 
-       if (priv->slave)
-               return -EBUSY;
-
        /*
         * Do not support ten bit chip address and do not use Packet Error
         * Checking (PEC).
         */
-       if (slave->flags & (I2C_CLIENT_TEN | I2C_CLIENT_PEC))
+       if (slave->flags & (I2C_CLIENT_TEN | I2C_CLIENT_PEC)) {
+               dev_err(dev, "SMBus PEC and 10 bit address not supported\n");
                return -EAFNOSUPPORT;
+       }
 
-       ret = mlxbf_slave_enable(priv, slave->addr);
-       if (ret < 0)
-               return ret;
-
-       priv->slave = slave;
+       ret = mlxbf_i2c_slave_enable(priv, slave);
+       if (ret)
+               dev_err(dev, "Surpassed max number of registered slaves allowed\n");
 
        return 0;
 }
@@ -2139,18 +2183,19 @@ static int mlxbf_i2c_reg_slave(struct i2c_client *slave)
 static int mlxbf_i2c_unreg_slave(struct i2c_client *slave)
 {
        struct mlxbf_i2c_priv *priv = i2c_get_adapdata(slave->adapter);
+       struct device *dev = &slave->dev;
        int ret;
 
-       WARN_ON(!priv->slave);
-
-       /* Unregister slave, i.e. disable the slave address in hardware. */
-       ret = mlxbf_slave_disable(priv);
-       if (ret < 0)
-               return ret;
-
-       priv->slave = NULL;
+       /*
+        * Unregister slave by:
+        * 1) Disabling the slave address in hardware
+        * 2) Freeing priv->slave at the corresponding index
+        */
+       ret = mlxbf_i2c_slave_disable(priv, slave->addr);
+       if (ret)
+               dev_err(dev, "Unable to find slave 0x%x\n", slave->addr);
 
-       return 0;
+       return ret;
 }
 
 static u32 mlxbf_i2c_functionality(struct i2c_adapter *adap)
@@ -2166,14 +2211,27 @@ static struct mlxbf_i2c_chip_info mlxbf_i2c_chip[] = {
                        [1] = &mlxbf_i2c_corepll_res[MLXBF_I2C_CHIP_TYPE_1],
                        [2] = &mlxbf_i2c_gpio_res[MLXBF_I2C_CHIP_TYPE_1]
                },
-               .calculate_freq = mlxbf_i2c_calculate_freq_from_tyu
+               .calculate_freq = mlxbf_i2c_calculate_freq_from_tyu,
+               .smbus_master_rs_bytes_off = MLXBF_I2C_YU_SMBUS_RS_BYTES,
+               .smbus_master_fsm_off = MLXBF_I2C_YU_SMBUS_MASTER_FSM
        },
        [MLXBF_I2C_CHIP_TYPE_2] = {
                .type = MLXBF_I2C_CHIP_TYPE_2,
                .shared_res = {
                        [0] = &mlxbf_i2c_corepll_res[MLXBF_I2C_CHIP_TYPE_2]
                },
-               .calculate_freq = mlxbf_i2c_calculate_freq_from_yu
+               .calculate_freq = mlxbf_i2c_calculate_freq_from_yu,
+               .smbus_master_rs_bytes_off = MLXBF_I2C_YU_SMBUS_RS_BYTES,
+               .smbus_master_fsm_off = MLXBF_I2C_YU_SMBUS_MASTER_FSM
+       },
+       [MLXBF_I2C_CHIP_TYPE_3] = {
+               .type = MLXBF_I2C_CHIP_TYPE_3,
+               .shared_res = {
+                       [0] = &mlxbf_i2c_corepll_res[MLXBF_I2C_CHIP_TYPE_3]
+               },
+               .calculate_freq = mlxbf_i2c_calculate_freq_from_yu,
+               .smbus_master_rs_bytes_off = MLXBF_I2C_RSH_YU_SMBUS_RS_BYTES,
+               .smbus_master_fsm_off = MLXBF_I2C_RSH_YU_SMBUS_MASTER_FSM
        }
 };
 
@@ -2189,24 +2247,11 @@ static struct i2c_adapter_quirks mlxbf_i2c_quirks = {
        .max_write_len = MLXBF_I2C_MASTER_DATA_W_LENGTH,
 };
 
-static const struct of_device_id mlxbf_i2c_dt_ids[] = {
-       {
-               .compatible = "mellanox,i2c-mlxbf1",
-               .data = &mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1]
-       },
-       {
-               .compatible = "mellanox,i2c-mlxbf2",
-               .data = &mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2]
-       },
-       {},
-};
-
-MODULE_DEVICE_TABLE(of, mlxbf_i2c_dt_ids);
-
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id mlxbf_i2c_acpi_ids[] = {
        { "MLNXBF03", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_1] },
        { "MLNXBF23", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_2] },
+       { "MLNXBF31", (kernel_ulong_t)&mlxbf_i2c_chip[MLXBF_I2C_CHIP_TYPE_3] },
        {},
 };
 
@@ -2244,36 +2289,12 @@ static int mlxbf_i2c_acpi_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
 }
 #endif /* CONFIG_ACPI */
 
-static int mlxbf_i2c_of_probe(struct device *dev, struct mlxbf_i2c_priv *priv)
-{
-       const struct of_device_id *oid;
-       int bus_id = -1;
-
-       if (IS_ENABLED(CONFIG_OF) && dev->of_node) {
-               oid = of_match_node(mlxbf_i2c_dt_ids, dev->of_node);
-               if (!oid)
-                       return -ENODEV;
-
-               priv->chip = oid->data;
-
-               bus_id = of_alias_get_id(dev->of_node, "i2c");
-               if (bus_id >= 0)
-                       priv->bus = bus_id;
-       }
-
-       if (bus_id < 0) {
-               dev_err(dev, "Cannot get bus id");
-               return bus_id;
-       }
-
-       return 0;
-}
-
 static int mlxbf_i2c_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct mlxbf_i2c_priv *priv;
        struct i2c_adapter *adap;
+       u32 resource_version;
        int irq, ret;
 
        priv = devm_kzalloc(dev, sizeof(struct mlxbf_i2c_priv), GFP_KERNEL);
@@ -2281,17 +2302,63 @@ static int mlxbf_i2c_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        ret = mlxbf_i2c_acpi_probe(dev, priv);
-       if (ret < 0 && ret != -ENOENT && ret != -ENXIO)
-               ret = mlxbf_i2c_of_probe(dev, priv);
-
        if (ret < 0)
                return ret;
 
-       ret = mlxbf_i2c_init_resource(pdev, &priv->smbus,
-                                     MLXBF_I2C_SMBUS_RES);
-       if (ret < 0) {
-               dev_err(dev, "Cannot fetch smbus resource info");
-               return ret;
+       /* This property allows the driver to stay backward compatible with older
+        * ACPI tables.
+        * Starting BlueField-3 SoC, the "smbus" resource was broken down into 3
+        * separate resources "timer", "master" and "slave".
+        */
+       if (device_property_read_u32(dev, "resource_version", &resource_version))
+               resource_version = 0;
+
+       priv->resource_version = resource_version;
+
+       if (priv->chip->type < MLXBF_I2C_CHIP_TYPE_3 && resource_version == 0) {
+               priv->timer = devm_kzalloc(dev, sizeof(struct mlxbf_i2c_resource), GFP_KERNEL);
+               if (!priv->timer)
+                       return -ENOMEM;
+
+               priv->mst = devm_kzalloc(dev, sizeof(struct mlxbf_i2c_resource), GFP_KERNEL);
+               if (!priv->mst)
+                       return -ENOMEM;
+
+               priv->slv = devm_kzalloc(dev, sizeof(struct mlxbf_i2c_resource), GFP_KERNEL);
+               if (!priv->slv)
+                       return -ENOMEM;
+
+               ret = mlxbf_i2c_init_resource(pdev, &priv->smbus,
+                                             MLXBF_I2C_SMBUS_RES);
+               if (ret < 0) {
+                       dev_err(dev, "Cannot fetch smbus resource info");
+                       return ret;
+               }
+
+               priv->timer->io = priv->smbus->io;
+               priv->mst->io = priv->smbus->io + MLXBF_I2C_MST_ADDR_OFFSET;
+               priv->slv->io = priv->smbus->io + MLXBF_I2C_SLV_ADDR_OFFSET;
+       } else {
+               ret = mlxbf_i2c_init_resource(pdev, &priv->timer,
+                                             MLXBF_I2C_SMBUS_TIMER_RES);
+               if (ret < 0) {
+                       dev_err(dev, "Cannot fetch timer resource info");
+                       return ret;
+               }
+
+               ret = mlxbf_i2c_init_resource(pdev, &priv->mst,
+                                             MLXBF_I2C_SMBUS_MST_RES);
+               if (ret < 0) {
+                       dev_err(dev, "Cannot fetch master resource info");
+                       return ret;
+               }
+
+               ret = mlxbf_i2c_init_resource(pdev, &priv->slv,
+                                             MLXBF_I2C_SMBUS_SLV_RES);
+               if (ret < 0) {
+                       dev_err(dev, "Cannot fetch slave resource info");
+                       return ret;
+               }
        }
 
        ret = mlxbf_i2c_init_resource(pdev, &priv->mst_cause,
@@ -2350,8 +2417,8 @@ static int mlxbf_i2c_probe(struct platform_device *pdev)
        irq = platform_get_irq(pdev, 0);
        if (irq < 0)
                return irq;
-       ret = devm_request_irq(dev, irq, mlxbf_smbus_irq,
-                              IRQF_ONESHOT | IRQF_SHARED | IRQF_PROBE_SHARED,
+       ret = devm_request_irq(dev, irq, mlxbf_i2c_irq,
+                              IRQF_SHARED | IRQF_PROBE_SHARED,
                               dev_name(dev), priv);
        if (ret < 0) {
                dev_err(dev, "Cannot get irq %d\n", irq);
@@ -2379,8 +2446,19 @@ static int mlxbf_i2c_remove(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct resource *params;
 
-       params = priv->smbus->params;
-       devm_release_mem_region(dev, params->start, resource_size(params));
+       if (priv->chip->type < MLXBF_I2C_CHIP_TYPE_3 && priv->resource_version == 0) {
+               params = priv->smbus->params;
+               devm_release_mem_region(dev, params->start, resource_size(params));
+       } else {
+               params = priv->timer->params;
+               devm_release_mem_region(dev, params->start, resource_size(params));
+
+               params = priv->mst->params;
+               devm_release_mem_region(dev, params->start, resource_size(params));
+
+               params = priv->slv->params;
+               devm_release_mem_region(dev, params->start, resource_size(params));
+       }
 
        params = priv->mst_cause->params;
        devm_release_mem_region(dev, params->start, resource_size(params));
@@ -2412,7 +2490,6 @@ static struct platform_driver mlxbf_i2c_driver = {
        .remove = mlxbf_i2c_remove,
        .driver = {
                .name = "i2c-mlxbf",
-               .of_match_table = mlxbf_i2c_dt_ids,
 #ifdef CONFIG_ACPI
                .acpi_match_table = ACPI_PTR(mlxbf_i2c_acpi_ids),
 #endif /* CONFIG_ACPI  */
@@ -2445,4 +2522,5 @@ module_exit(mlxbf_i2c_exit);
 
 MODULE_DESCRIPTION("Mellanox BlueField I2C bus driver");
 MODULE_AUTHOR("Khalil Blaiech <kblaiech@nvidia.com>");
+MODULE_AUTHOR("Asmaa Mnebhi <asmaa@nvidia.com>");
 MODULE_LICENSE("GPL v2");
index ecba1df..849848c 100644 (file)
@@ -400,7 +400,6 @@ static int riic_i2c_probe(struct platform_device *pdev)
 {
        struct riic_dev *riic;
        struct i2c_adapter *adap;
-       struct resource *res;
        struct i2c_timings i2c_t;
        struct reset_control *rstc;
        int i, ret;
@@ -409,8 +408,7 @@ static int riic_i2c_probe(struct platform_device *pdev)
        if (!riic)
                return -ENOMEM;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       riic->base = devm_ioremap_resource(&pdev->dev, res);
+       riic->base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(riic->base))
                return PTR_ERR(riic->base);
 
index 2e98e77..d1658ed 100644 (file)
@@ -1165,6 +1165,11 @@ static const struct rk3x_i2c_soc_data rv1108_soc_data = {
        .calc_timings = rk3x_i2c_v1_calc_timings,
 };
 
+static const struct rk3x_i2c_soc_data rv1126_soc_data = {
+       .grf_offset = 0x118,
+       .calc_timings = rk3x_i2c_v1_calc_timings,
+};
+
 static const struct rk3x_i2c_soc_data rk3066_soc_data = {
        .grf_offset = 0x154,
        .calc_timings = rk3x_i2c_v0_calc_timings,
@@ -1196,6 +1201,10 @@ static const struct of_device_id rk3x_i2c_match[] = {
                .data = &rv1108_soc_data
        },
        {
+               .compatible = "rockchip,rv1126-i2c",
+               .data = &rv1126_soc_data
+       },
+       {
                .compatible = "rockchip,rk3066-i2c",
                .data = &rk3066_soc_data
        },
index 6746aa4..0239e13 100644 (file)
@@ -6,15 +6,13 @@
  */
 
 #include <linux/module.h>
+#include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/stddef.h>
 #include <linux/i2c.h>
 #include <linux/acpi.h>
 
-#define ACPI_SMBUS_HC_CLASS            "smbus"
-#define ACPI_SMBUS_HC_DEVICE_NAME      "cmi"
-
 /* SMBUS HID definition as supported by Microsoft Windows */
 #define ACPI_SMBUS_MS_HID              "SMB0001"
 
@@ -30,7 +28,7 @@ struct acpi_smbus_cmi {
        u8 cap_info:1;
        u8 cap_read:1;
        u8 cap_write:1;
-       struct smbus_methods_t *methods;
+       const struct smbus_methods_t *methods;
 };
 
 static const struct smbus_methods_t smbus_methods = {
@@ -358,29 +356,25 @@ static acpi_status acpi_smbus_cmi_query_methods(acpi_handle handle, u32 level,
        return AE_OK;
 }
 
-static int acpi_smbus_cmi_add(struct acpi_device *device)
+static int smbus_cmi_probe(struct platform_device *device)
 {
+       struct device *dev = &device->dev;
        struct acpi_smbus_cmi *smbus_cmi;
-       const struct acpi_device_id *id;
        int ret;
 
        smbus_cmi = kzalloc(sizeof(struct acpi_smbus_cmi), GFP_KERNEL);
        if (!smbus_cmi)
                return -ENOMEM;
 
-       smbus_cmi->handle = device->handle;
-       strcpy(acpi_device_name(device), ACPI_SMBUS_HC_DEVICE_NAME);
-       strcpy(acpi_device_class(device), ACPI_SMBUS_HC_CLASS);
-       device->driver_data = smbus_cmi;
+       smbus_cmi->handle = ACPI_HANDLE(dev);
+       smbus_cmi->methods = device_get_match_data(dev);
+
+       platform_set_drvdata(device, smbus_cmi);
+
        smbus_cmi->cap_info = 0;
        smbus_cmi->cap_read = 0;
        smbus_cmi->cap_write = 0;
 
-       for (id = acpi_smbus_cmi_ids; id->id[0]; id++)
-               if (!strcmp(id->id, acpi_device_hid(device)))
-                       smbus_cmi->methods =
-                               (struct smbus_methods_t *) id->driver_data;
-
        acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1,
                            acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL);
 
@@ -390,8 +384,7 @@ static int acpi_smbus_cmi_add(struct acpi_device *device)
        }
 
        snprintf(smbus_cmi->adapter.name, sizeof(smbus_cmi->adapter.name),
-               "SMBus CMI adapter %s",
-               acpi_device_name(device));
+                "SMBus CMI adapter %s", dev_name(dev));
        smbus_cmi->adapter.owner = THIS_MODULE;
        smbus_cmi->adapter.algo = &acpi_smbus_cmi_algorithm;
        smbus_cmi->adapter.algo_data = smbus_cmi;
@@ -408,31 +401,28 @@ static int acpi_smbus_cmi_add(struct acpi_device *device)
 
 err:
        kfree(smbus_cmi);
-       device->driver_data = NULL;
        return ret;
 }
 
-static int acpi_smbus_cmi_remove(struct acpi_device *device)
+static int smbus_cmi_remove(struct platform_device *device)
 {
-       struct acpi_smbus_cmi *smbus_cmi = acpi_driver_data(device);
+       struct acpi_smbus_cmi *smbus_cmi = platform_get_drvdata(device);
 
        i2c_del_adapter(&smbus_cmi->adapter);
        kfree(smbus_cmi);
-       device->driver_data = NULL;
 
        return 0;
 }
 
-static struct acpi_driver acpi_smbus_cmi_driver = {
-       .name = ACPI_SMBUS_HC_DEVICE_NAME,
-       .class = ACPI_SMBUS_HC_CLASS,
-       .ids = acpi_smbus_cmi_ids,
-       .ops = {
-               .add = acpi_smbus_cmi_add,
-               .remove = acpi_smbus_cmi_remove,
+static struct platform_driver smbus_cmi_driver = {
+       .probe = smbus_cmi_probe,
+       .remove = smbus_cmi_remove,
+       .driver = {
+               .name   = "smbus_cmi",
+               .acpi_match_table = acpi_smbus_cmi_ids,
        },
 };
-module_acpi_driver(acpi_smbus_cmi_driver);
+module_platform_driver(smbus_cmi_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Crane Cai <crane.cai@amd.com>");
index 031c78a..954022c 100644 (file)
@@ -443,11 +443,16 @@ static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev)
        u32 *dma_buf;
        int err;
 
-       if (!i2c_dev->hw->has_apb_dma || i2c_dev->is_vi)
+       if (i2c_dev->is_vi)
                return 0;
 
-       if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {
-               dev_dbg(i2c_dev->dev, "DMA support not enabled\n");
+       if (!i2c_dev->hw->has_apb_dma) {
+               if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {
+                       dev_dbg(i2c_dev->dev, "APB DMA support not enabled\n");
+                       return 0;
+               }
+       } else if (!IS_ENABLED(CONFIG_TEGRA186_GPC_DMA)) {
+               dev_dbg(i2c_dev->dev, "GPC DMA support not enabled\n");
                return 0;
        }
 
index 08b561f..da6568a 100644 (file)
@@ -26,7 +26,7 @@ struct gsb_buffer {
        union {
                u16     wdata;
                u8      bdata;
-               u8      data[0];
+               DECLARE_FLEX_ARRAY(u8, data);
        };
 } __packed;
 
index 9100755..8c7e349 100644 (file)
@@ -599,13 +599,9 @@ static void i2c_device_remove(struct device *dev)
 
        driver = to_i2c_driver(dev->driver);
        if (driver->remove) {
-               int status;
-
                dev_dbg(dev, "remove\n");
 
-               status = driver->remove(client);
-               if (status)
-                       dev_warn(dev, "remove failed (%pe), will be ignored\n", ERR_PTR(status));
+               driver->remove(client);
        }
 
        devres_release_group(&client->dev, client->devres_group_id);
index 5c7ae42..4abc2d9 100644 (file)
@@ -181,14 +181,12 @@ static int i2c_slave_eeprom_probe(struct i2c_client *client, const struct i2c_de
        return 0;
 };
 
-static int i2c_slave_eeprom_remove(struct i2c_client *client)
+static void i2c_slave_eeprom_remove(struct i2c_client *client)
 {
        struct eeprom_data *eeprom = i2c_get_clientdata(client);
 
        i2c_slave_unregister(client);
        sysfs_remove_bin_file(&client->dev.kobj, &eeprom->bin);
-
-       return 0;
 }
 
 static const struct i2c_device_id i2c_slave_eeprom_id[] = {
index 56dae08..75ee7eb 100644 (file)
@@ -153,13 +153,12 @@ static int i2c_slave_testunit_probe(struct i2c_client *client)
        return i2c_slave_register(client, i2c_slave_testunit_slave_cb);
 };
 
-static int i2c_slave_testunit_remove(struct i2c_client *client)
+static void i2c_slave_testunit_remove(struct i2c_client *client)
 {
        struct testunit_data *tu = i2c_get_clientdata(client);
 
        cancel_delayed_work_sync(&tu->worker);
        i2c_slave_unregister(client);
-       return 0;
 }
 
 static const struct i2c_device_id i2c_slave_testunit_id[] = {
index 8ba9b59..07c92c8 100644 (file)
@@ -153,12 +153,11 @@ static int smbalert_probe(struct i2c_client *ara,
 }
 
 /* IRQ and memory resources are managed so they are freed automatically */
-static int smbalert_remove(struct i2c_client *ara)
+static void smbalert_remove(struct i2c_client *ara)
 {
        struct i2c_smbus_alert *alert = i2c_get_clientdata(ara);
 
        cancel_work_sync(&alert->alert);
-       return 0;
 }
 
 static const struct i2c_device_id smbalert_ids[] = {
index 1708b1a..ea838db 100644 (file)
@@ -9,7 +9,7 @@ menu "Multiplexer I2C Chip support"
 config I2C_ARB_GPIO_CHALLENGE
        tristate "GPIO-based I2C arbitration"
        depends on GPIOLIB || COMPILE_TEST
-       depends on OF || COMPILE_TEST
+       depends on OF
        help
          If you say yes to this option, support will be included for an
          I2C multimaster arbitration scheme using GPIOs and a challenge &
@@ -34,7 +34,7 @@ config I2C_MUX_GPIO
 config I2C_MUX_GPMUX
        tristate "General Purpose I2C multiplexer"
        select MULTIPLEXER
-       depends on OF || COMPILE_TEST
+       depends on OF
        help
          If you say yes to this option, support will be included for a
          general purpose I2C multiplexer. This driver provides access to
@@ -77,7 +77,7 @@ config I2C_MUX_PCA954x
 config I2C_MUX_PINCTRL
        tristate "pinctrl-based I2C multiplexer"
        depends on PINCTRL
-       depends on OF || COMPILE_TEST
+       depends on OF
        help
          If you say yes to this option, support will be included for an I2C
          multiplexer that uses the pinctrl subsystem, i.e. pin multiplexing.
index 704f1e5..7083582 100644 (file)
@@ -294,13 +294,11 @@ static int ltc4306_probe(struct i2c_client *client)
        return 0;
 }
 
-static int ltc4306_remove(struct i2c_client *client)
+static void ltc4306_remove(struct i2c_client *client)
 {
        struct i2c_mux_core *muxc = i2c_get_clientdata(client);
 
        i2c_mux_del_adapters(muxc);
-
-       return 0;
 }
 
 static struct i2c_driver ltc4306_driver = {
index 6daec8d..ea83de7 100644 (file)
@@ -325,12 +325,11 @@ static int pca9541_probe(struct i2c_client *client,
        return 0;
 }
 
-static int pca9541_remove(struct i2c_client *client)
+static void pca9541_remove(struct i2c_client *client)
 {
        struct i2c_mux_core *muxc = i2c_get_clientdata(client);
 
        i2c_mux_del_adapters(muxc);
-       return 0;
 }
 
 static struct i2c_driver pca9541_driver = {
index 4ad6657..a5f458b 100644 (file)
@@ -521,14 +521,13 @@ fail_cleanup:
        return ret;
 }
 
-static int pca954x_remove(struct i2c_client *client)
+static void pca954x_remove(struct i2c_client *client)
 {
        struct i2c_mux_core *muxc = i2c_get_clientdata(client);
 
        device_remove_file(&client->dev, &dev_attr_idle_state);
 
        pca954x_cleanup(muxc);
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index f1bb00a..d5ad904 100644 (file)
@@ -185,7 +185,7 @@ MODULE_DEVICE_TABLE(of, i2c_mux_pinctrl_of_match);
 static struct platform_driver i2c_mux_pinctrl_driver = {
        .driver = {
                .name   = "i2c-mux-pinctrl",
-               .of_match_table = of_match_ptr(i2c_mux_pinctrl_of_match),
+               .of_match_table = i2c_mux_pinctrl_of_match,
        },
        .probe  = i2c_mux_pinctrl_probe,
        .remove = i2c_mux_pinctrl_remove,
index 9c9e985..d03fc34 100644 (file)
@@ -1045,7 +1045,7 @@ err_disable_vdd:
        return ret;
 }
 
-static int bma180_remove(struct i2c_client *client)
+static void bma180_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct bma180_data *data = iio_priv(indio_dev);
@@ -1062,8 +1062,6 @@ static int bma180_remove(struct i2c_client *client)
        mutex_unlock(&data->mutex);
        regulator_disable(data->vddio_supply);
        regulator_disable(data->vdd_supply);
-
-       return 0;
 }
 
 static int bma180_suspend(struct device *dev)
index dff4d7d..be8cc59 100644 (file)
@@ -209,13 +209,11 @@ static int bmc150_accel_probe(struct i2c_client *client,
        return 0;
 }
 
-static int bmc150_accel_remove(struct i2c_client *client)
+static void bmc150_accel_remove(struct i2c_client *client)
 {
        bmc150_acpi_dual_accel_remove(client);
 
        bmc150_accel_core_remove(&client->dev);
-
-       return 0;
 }
 
 static const struct acpi_device_id bmc150_accel_acpi_match[] = {
index 748b35c..94f7b6a 100644 (file)
@@ -1611,7 +1611,7 @@ err_poweroff:
        return ret;
 }
 
-static int kxcjk1013_remove(struct i2c_client *client)
+static void kxcjk1013_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct kxcjk1013_data *data = iio_priv(indio_dev);
@@ -1630,8 +1630,6 @@ static int kxcjk1013_remove(struct i2c_client *client)
        mutex_lock(&data->mutex);
        kxcjk1013_set_mode(data, STANDBY);
        mutex_unlock(&data->mutex);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index d57f264..61346ea 100644 (file)
@@ -32,11 +32,9 @@ static int kxsd9_i2c_probe(struct i2c_client *i2c,
                                  i2c->name);
 }
 
-static int kxsd9_i2c_remove(struct i2c_client *client)
+static void kxsd9_i2c_remove(struct i2c_client *client)
 {
        kxsd9_common_remove(&client->dev);
-
-       return 0;
 }
 
 static const struct of_device_id kxsd9_of_match[] = {
index c15d16e..2462000 100644 (file)
@@ -151,15 +151,13 @@ static int mc3230_probe(struct i2c_client *client,
        return ret;
 }
 
-static int mc3230_remove(struct i2c_client *client)
+static void mc3230_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
        iio_device_unregister(indio_dev);
 
        mc3230_set_opcon(iio_priv(indio_dev), MC3230_MODE_OPCON_STANDBY);
-
-       return 0;
 }
 
 static int mc3230_suspend(struct device *dev)
index a3b84e8..c63b321 100644 (file)
@@ -26,11 +26,9 @@ static int mma7455_i2c_probe(struct i2c_client *i2c,
        return mma7455_core_probe(&i2c->dev, regmap, name);
 }
 
-static int mma7455_i2c_remove(struct i2c_client *i2c)
+static void mma7455_i2c_remove(struct i2c_client *i2c)
 {
        mma7455_core_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id mma7455_i2c_ids[] = {
index 794f2f3..8582999 100644 (file)
@@ -207,7 +207,7 @@ static int mma7660_probe(struct i2c_client *client,
        return ret;
 }
 
-static int mma7660_remove(struct i2c_client *client)
+static void mma7660_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        int ret;
@@ -218,8 +218,6 @@ static int mma7660_remove(struct i2c_client *client)
        if (ret)
                dev_warn(&client->dev, "Failed to put device in stand-by mode (%pe), ignoring\n",
                         ERR_PTR(ret));
-
-       return 0;
 }
 
 static int mma7660_suspend(struct device *dev)
index c7d9ca9..3ba28c2 100644 (file)
@@ -1735,7 +1735,7 @@ disable_regulator_vdd:
        return ret;
 }
 
-static int mma8452_remove(struct i2c_client *client)
+static void mma8452_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct mma8452_data *data = iio_priv(indio_dev);
@@ -1751,8 +1751,6 @@ static int mma8452_remove(struct i2c_client *client)
 
        regulator_disable(data->vddio_reg);
        regulator_disable(data->vdd_reg);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 123cdbb..f7a793f 100644 (file)
@@ -509,7 +509,7 @@ out_poweroff:
        return ret;
 }
 
-static int mma9551_remove(struct i2c_client *client)
+static void mma9551_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct mma9551_data *data = iio_priv(indio_dev);
@@ -522,8 +522,6 @@ static int mma9551_remove(struct i2c_client *client)
        mutex_lock(&data->mutex);
        mma9551_set_device_state(data->client, false);
        mutex_unlock(&data->mutex);
-
-       return 0;
 }
 
 static int mma9551_runtime_suspend(struct device *dev)
index 09df58d..2da0e00 100644 (file)
@@ -1148,7 +1148,7 @@ out_poweroff:
        return ret;
 }
 
-static int mma9553_remove(struct i2c_client *client)
+static void mma9553_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct mma9553_data *data = iio_priv(indio_dev);
@@ -1161,8 +1161,6 @@ static int mma9553_remove(struct i2c_client *client)
        mutex_lock(&data->mutex);
        mma9551_set_device_state(data->client, false);
        mutex_unlock(&data->mutex);
-
-       return 0;
 }
 
 static int mma9553_runtime_suspend(struct device *dev)
index ceca289..7b1d6fb 100644 (file)
@@ -597,7 +597,7 @@ err_power_off:
        return ret;
 }
 
-static int stk8312_remove(struct i2c_client *client)
+static void stk8312_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct stk8312_data *data = iio_priv(indio_dev);
@@ -609,8 +609,6 @@ static int stk8312_remove(struct i2c_client *client)
                iio_trigger_unregister(data->dready_trig);
 
        stk8312_set_mode(data, STK8312_MODE_STANDBY);
-
-       return 0;
 }
 
 static int stk8312_suspend(struct device *dev)
index 7d59efb..2f5e4ab 100644 (file)
@@ -490,7 +490,7 @@ err_power_off:
        return ret;
 }
 
-static int stk8ba50_remove(struct i2c_client *client)
+static void stk8ba50_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct stk8ba50_data *data = iio_priv(indio_dev);
@@ -502,8 +502,6 @@ static int stk8ba50_remove(struct i2c_client *client)
                iio_trigger_unregister(data->dready_trig);
 
        stk8ba50_set_power(data, STK8BA50_MODE_SUSPEND);
-
-       return 0;
 }
 
 static int stk8ba50_suspend(struct device *dev)
index 262bd76..6dbe9d5 100644 (file)
@@ -880,7 +880,7 @@ error_disable_reg:
        return ret;
 }
 
-static int ad799x_remove(struct i2c_client *client)
+static void ad799x_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct ad799x_state *st = iio_priv(indio_dev);
@@ -892,8 +892,6 @@ static int ad799x_remove(struct i2c_client *client)
                regulator_disable(st->vref);
        regulator_disable(st->reg);
        kfree(st->rx_buf);
-
-       return 0;
 }
 
 static int ad799x_suspend(struct device *dev)
index 240e6c4..910e7e9 100644 (file)
@@ -1034,7 +1034,7 @@ static int ina2xx_probe(struct i2c_client *client,
        return iio_device_register(indio_dev);
 }
 
-static int ina2xx_remove(struct i2c_client *client)
+static void ina2xx_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct ina2xx_chip_info *chip = iio_priv(indio_dev);
@@ -1048,8 +1048,6 @@ static int ina2xx_remove(struct i2c_client *client)
        if (ret)
                dev_warn(&client->dev, "Failed to power down device (%pe)\n",
                         ERR_PTR(ret));
-
-       return 0;
 }
 
 static const struct i2c_device_id ina2xx_id[] = {
index f7c786f..d58a432 100644 (file)
@@ -74,13 +74,11 @@ static int ltc2497_probe(struct i2c_client *client,
        return ltc2497core_probe(dev, indio_dev);
 }
 
-static int ltc2497_remove(struct i2c_client *client)
+static void ltc2497_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
        ltc2497core_remove(indio_dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id ltc2497_id[] = {
index e3dfc15..8bceba6 100644 (file)
@@ -1094,7 +1094,7 @@ static int ads1015_probe(struct i2c_client *client,
        return 0;
 }
 
-static int ads1015_remove(struct i2c_client *client)
+static void ads1015_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct ads1015_data *data = iio_priv(indio_dev);
@@ -1110,8 +1110,6 @@ static int ads1015_remove(struct i2c_client *client)
        if (ret)
                dev_warn(&client->dev, "Failed to power down (%pe)\n",
                         ERR_PTR(ret));
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 8378c00..7cac77a 100644 (file)
@@ -722,7 +722,7 @@ unregister_trigger:
        return ret;
 }
 
-static int atlas_remove(struct i2c_client *client)
+static void atlas_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct atlas_data *data = iio_priv(indio_dev);
@@ -739,8 +739,6 @@ static int atlas_remove(struct i2c_client *client)
        if (ret)
                dev_err(&client->dev, "Failed to power down device (%pe)\n",
                        ERR_PTR(ret));
-
-       return 0;
 }
 
 static int atlas_runtime_suspend(struct device *dev)
index 560183e..ba4045e 100644 (file)
@@ -532,7 +532,7 @@ err_poweroff:
        return ret;
 }
 
-static int ccs811_remove(struct i2c_client *client)
+static void ccs811_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct ccs811_data *data = iio_priv(indio_dev);
@@ -548,8 +548,6 @@ static int ccs811_remove(struct i2c_client *client)
        if (ret)
                dev_warn(&client->dev, "Failed to power down device (%pe)\n",
                         ERR_PTR(ret));
-
-       return 0;
 }
 
 static const struct i2c_device_id ccs811_id[] = {
index 2343d44..e2c13c7 100644 (file)
@@ -552,15 +552,13 @@ static int sgp_probe(struct i2c_client *client,
        return 0;
 }
 
-static int sgp_remove(struct i2c_client *client)
+static void sgp_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct sgp_data *data = iio_priv(indio_dev);
 
        if (data->iaq_thread)
                kthread_stop(data->iaq_thread);
-
-       return 0;
 }
 
 static const struct i2c_device_id sgp_id[] = {
index 8177515..a81bfa4 100644 (file)
@@ -559,11 +559,9 @@ static int ad5380_i2c_probe(struct i2c_client *i2c,
        return ad5380_probe(&i2c->dev, regmap, id->driver_data, id->name);
 }
 
-static int ad5380_i2c_remove(struct i2c_client *i2c)
+static void ad5380_i2c_remove(struct i2c_client *i2c)
 {
        ad5380_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id ad5380_i2c_ids[] = {
index 09e2429..7324065 100644 (file)
@@ -575,11 +575,9 @@ static int ad5446_i2c_probe(struct i2c_client *i2c,
                &ad5446_i2c_chip_info[id->driver_data]);
 }
 
-static int ad5446_i2c_remove(struct i2c_client *i2c)
+static void ad5446_i2c_remove(struct i2c_client *i2c)
 {
        ad5446_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id ad5446_i2c_ids[] = {
index 34e1319..92be661 100644 (file)
@@ -97,11 +97,9 @@ static int ad5593r_i2c_probe(struct i2c_client *i2c,
        return ad5592r_probe(&i2c->dev, id->name, &ad5593r_rw_ops);
 }
 
-static int ad5593r_i2c_remove(struct i2c_client *i2c)
+static void ad5593r_i2c_remove(struct i2c_client *i2c)
 {
        ad5592r_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id ad5593r_i2c_ids[] = {
index 762503c..aa36cbf 100644 (file)
@@ -65,11 +65,9 @@ static int ad5686_i2c_probe(struct i2c_client *i2c,
                            ad5686_i2c_write, ad5686_i2c_read);
 }
 
-static int ad5686_i2c_remove(struct i2c_client *i2c)
+static void ad5686_i2c_remove(struct i2c_client *i2c)
 {
        ad5686_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id ad5686_i2c_id[] = {
index 5093946..3e17a68 100644 (file)
@@ -281,15 +281,13 @@ fail:
        return ret;
 }
 
-static int ds4424_remove(struct i2c_client *client)
+static void ds4424_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct ds4424_data *data = iio_priv(indio_dev);
 
        iio_device_unregister(indio_dev);
        regulator_disable(data->vcc_reg);
-
-       return 0;
 }
 
 static const struct i2c_device_id ds4424_id[] = {
index 22b02f5..5a812f8 100644 (file)
@@ -218,7 +218,7 @@ err:
        return ret;
 }
 
-static int m62332_remove(struct i2c_client *client)
+static void m62332_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
@@ -226,8 +226,6 @@ static int m62332_remove(struct i2c_client *client)
        iio_map_array_unregister(indio_dev);
        m62332_set_value(indio_dev, 0, 0);
        m62332_set_value(indio_dev, 0, 1);
-
-       return 0;
 }
 
 static const struct i2c_device_id m62332_id[] = {
index bb4b85a..446d1a8 100644 (file)
@@ -486,7 +486,7 @@ err_disable_vdd_reg:
        return err;
 }
 
-static int mcp4725_remove(struct i2c_client *client)
+static void mcp4725_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct mcp4725_data *data = iio_priv(indio_dev);
@@ -496,8 +496,6 @@ static int mcp4725_remove(struct i2c_client *client)
        if (data->vref_reg)
                regulator_disable(data->vref_reg);
        regulator_disable(data->vdd_reg);
-
-       return 0;
 }
 
 static const struct i2c_device_id mcp4725_id[] = {
index f91f8a5..3210e30 100644 (file)
@@ -382,15 +382,13 @@ static int dac5571_probe(struct i2c_client *client,
        return ret;
 }
 
-static int dac5571_remove(struct i2c_client *i2c)
+static void dac5571_remove(struct i2c_client *i2c)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(i2c);
        struct dac5571_data *data = iio_priv(indio_dev);
 
        iio_device_unregister(indio_dev);
        regulator_disable(data->vref);
-
-       return 0;
 }
 
 static const struct of_device_id dac5571_of_id[] = {
index b3fa46b..908ccc3 100644 (file)
@@ -32,11 +32,9 @@ static int bmg160_i2c_probe(struct i2c_client *client,
        return bmg160_core_probe(&client->dev, regmap, client->irq, name);
 }
 
-static int bmg160_i2c_remove(struct i2c_client *client)
+static void bmg160_i2c_remove(struct i2c_client *client)
 {
        bmg160_core_remove(&client->dev);
-
-       return 0;
 }
 
 static const struct acpi_device_id bmg160_acpi_match[] = {
index a7807fd..13bb52c 100644 (file)
@@ -33,11 +33,9 @@ static int fxas21002c_i2c_probe(struct i2c_client *i2c)
        return fxas21002c_core_probe(&i2c->dev, regmap, i2c->irq, i2c->name);
 }
 
-static int fxas21002c_i2c_remove(struct i2c_client *i2c)
+static void fxas21002c_i2c_remove(struct i2c_client *i2c)
 {
        fxas21002c_core_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id fxas21002c_i2c_id[] = {
index 0491c64..4215015 100644 (file)
@@ -350,7 +350,7 @@ error_unconfigure_buffer:
        return ret;
 }
 
-static int itg3200_remove(struct i2c_client *client)
+static void itg3200_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
@@ -360,8 +360,6 @@ static int itg3200_remove(struct i2c_client *client)
                itg3200_remove_trigger(indio_dev);
 
        itg3200_buffer_unconfigure(indio_dev);
-
-       return 0;
 }
 
 static int itg3200_suspend(struct device *dev)
index 78f4a01..12e3afa 100644 (file)
@@ -78,7 +78,7 @@ static int mpu3050_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int mpu3050_i2c_remove(struct i2c_client *client)
+static void mpu3050_i2c_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = dev_get_drvdata(&client->dev);
        struct mpu3050 *mpu3050 = iio_priv(indio_dev);
@@ -87,8 +87,6 @@ static int mpu3050_i2c_remove(struct i2c_client *client)
                i2c_mux_del_adapters(mpu3050->i2cmux);
 
        mpu3050_common_remove(&client->dev);
-
-       return 0;
 }
 
 /*
index dd78001..8fca787 100644 (file)
@@ -578,7 +578,7 @@ disable_reg:
        return ret;
 }
 
-static int afe4404_remove(struct i2c_client *client)
+static void afe4404_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct afe4404_data *afe = iio_priv(indio_dev);
@@ -594,8 +594,6 @@ static int afe4404_remove(struct i2c_client *client)
        ret = regulator_disable(afe->regulator);
        if (ret)
                dev_err(afe->dev, "Unable to disable regulator\n");
-
-       return 0;
 }
 
 static const struct i2c_device_id afe4404_ids[] = {
index ad57179..2cca5e0 100644 (file)
@@ -471,15 +471,13 @@ static int max30100_probe(struct i2c_client *client,
        return iio_device_register(indio_dev);
 }
 
-static int max30100_remove(struct i2c_client *client)
+static void max30100_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct max30100_data *data = iio_priv(indio_dev);
 
        iio_device_unregister(indio_dev);
        max30100_set_powermode(data, false);
-
-       return 0;
 }
 
 static const struct i2c_device_id max30100_id[] = {
index abbcef5..437298a 100644 (file)
@@ -592,15 +592,13 @@ static int max30102_probe(struct i2c_client *client,
        return iio_device_register(indio_dev);
 }
 
-static int max30102_remove(struct i2c_client *client)
+static void max30102_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct max30102_data *data = iio_priv(indio_dev);
 
        iio_device_unregister(indio_dev);
        max30102_set_power(data, false);
-
-       return 0;
 }
 
 static const struct i2c_device_id max30102_id[] = {
index 1381df4..d6858cc 100644 (file)
@@ -308,7 +308,7 @@ static int hdc2010_probe(struct i2c_client *client,
        return iio_device_register(indio_dev);
 }
 
-static int hdc2010_remove(struct i2c_client *client)
+static void hdc2010_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct hdc2010_data *data = iio_priv(indio_dev);
@@ -318,8 +318,6 @@ static int hdc2010_remove(struct i2c_client *client)
        /* Disable Automatic Measurement Mode */
        if (hdc2010_update_drdy_config(data, HDC2010_AMM, 0))
                dev_warn(&client->dev, "Unable to restore default AMM\n");
-
-       return 0;
 }
 
 static const struct i2c_device_id hdc2010_id[] = {
index 2aa6477..14255a9 100644 (file)
@@ -157,7 +157,7 @@ out_del_mux:
        return result;
 }
 
-static int inv_mpu_remove(struct i2c_client *client)
+static void inv_mpu_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct inv_mpu6050_state *st = iio_priv(indio_dev);
@@ -166,8 +166,6 @@ static int inv_mpu_remove(struct i2c_client *client)
                inv_mpu_acpi_delete_mux_client(client);
                i2c_mux_del_adapters(st->muxc);
        }
-
-       return 0;
 }
 
 /*
index ec23b1e..b10c0dc 100644 (file)
@@ -1418,7 +1418,7 @@ err_chip_uninit:
        return ret;
 }
 
-static int kmx61_remove(struct i2c_client *client)
+static void kmx61_remove(struct i2c_client *client)
 {
        struct kmx61_data *data = i2c_get_clientdata(client);
 
@@ -1439,8 +1439,6 @@ static int kmx61_remove(struct i2c_client *client)
        mutex_lock(&data->lock);
        kmx61_set_mode(data, KMX61_ALL_STBY, KMX61_ACC | KMX61_MAG, true);
        mutex_unlock(&data->lock);
-
-       return 0;
 }
 
 static int kmx61_suspend(struct device *dev)
index 0f9d775..b70f268 100644 (file)
@@ -452,7 +452,7 @@ err:
        return ret;
 }
 
-static int apds9300_remove(struct i2c_client *client)
+static void apds9300_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct apds9300_data *data = iio_priv(indio_dev);
@@ -462,8 +462,6 @@ static int apds9300_remove(struct i2c_client *client)
        /* Ensure that power off and interrupts are disabled */
        apds9300_set_intr_state(data, 0);
        apds9300_set_power_state(data, 0);
-
-       return 0;
 }
 
 static int apds9300_suspend(struct device *dev)
index 09b831f..b62c139 100644 (file)
@@ -1067,7 +1067,7 @@ error_power_down:
        return ret;
 }
 
-static int apds9960_remove(struct i2c_client *client)
+static void apds9960_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct apds9960_data *data = iio_priv(indio_dev);
@@ -1076,8 +1076,6 @@ static int apds9960_remove(struct i2c_client *client)
        pm_runtime_disable(&client->dev);
        pm_runtime_set_suspended(&client->dev);
        apds9960_set_powermode(data, 0);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 471985c..3e92820 100644 (file)
@@ -263,7 +263,7 @@ static int bh1750_probe(struct i2c_client *client,
        return iio_device_register(indio_dev);
 }
 
-static int bh1750_remove(struct i2c_client *client)
+static void bh1750_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct bh1750_data *data = iio_priv(indio_dev);
@@ -273,8 +273,6 @@ static int bh1750_remove(struct i2c_client *client)
        mutex_lock(&data->lock);
        i2c_smbus_write_byte(client, BH1750_POWER_DOWN);
        mutex_unlock(&data->lock);
-
-       return 0;
 }
 
 static int bh1750_suspend(struct device *dev)
index fc71413..90bca39 100644 (file)
@@ -202,7 +202,7 @@ out_disable_pm:
        return ret;
 }
 
-static int bh1780_remove(struct i2c_client *client)
+static void bh1780_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct bh1780_data *bh1780 = iio_priv(indio_dev);
@@ -216,8 +216,6 @@ static int bh1780_remove(struct i2c_client *client)
        if (ret < 0)
                dev_err(&client->dev, "failed to power off (%pe)\n",
                        ERR_PTR(ret));
-
-       return 0;
 }
 
 static int bh1780_runtime_suspend(struct device *dev)
index 2c80a05..5214cd0 100644 (file)
@@ -357,7 +357,7 @@ static int cm3232_probe(struct i2c_client *client,
        return iio_device_register(indio_dev);
 }
 
-static int cm3232_remove(struct i2c_client *client)
+static void cm3232_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
@@ -365,8 +365,6 @@ static int cm3232_remove(struct i2c_client *client)
                CM3232_CMD_ALS_DISABLE);
 
        iio_device_unregister(indio_dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id cm3232_id[] = {
index 89f5e48..6615c98 100644 (file)
@@ -700,7 +700,7 @@ error_disable_reg:
        return ret;
 }
 
-static int cm36651_remove(struct i2c_client *client)
+static void cm36651_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct cm36651_data *cm36651 = iio_priv(indio_dev);
@@ -710,8 +710,6 @@ static int cm36651_remove(struct i2c_client *client)
        free_irq(client->irq, indio_dev);
        i2c_unregister_device(cm36651->ps_client);
        i2c_unregister_device(cm36651->ara_client);
-
-       return 0;
 }
 
 static const struct i2c_device_id cm36651_id[] = {
index e270741..8000fa3 100644 (file)
@@ -619,7 +619,7 @@ out_disable_vdd:
        return ret;
 }
 
-static int gp2ap002_remove(struct i2c_client *client)
+static void gp2ap002_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct gp2ap002 *gp2ap002 = iio_priv(indio_dev);
@@ -631,8 +631,6 @@ static int gp2ap002_remove(struct i2c_client *client)
        iio_device_unregister(indio_dev);
        regulator_disable(gp2ap002->vio);
        regulator_disable(gp2ap002->vdd);
-
-       return 0;
 }
 
 static int gp2ap002_runtime_suspend(struct device *dev)
index b820041..8264392 100644 (file)
@@ -1573,7 +1573,7 @@ error_regulator_disable:
        return err;
 }
 
-static int gp2ap020a00f_remove(struct i2c_client *client)
+static void gp2ap020a00f_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct gp2ap020a00f_data *data = iio_priv(indio_dev);
@@ -1589,8 +1589,6 @@ static int gp2ap020a00f_remove(struct i2c_client *client)
        free_irq(client->irq, indio_dev);
        iio_triggered_buffer_cleanup(indio_dev);
        regulator_disable(data->vled_reg);
-
-       return 0;
 }
 
 static const struct i2c_device_id gp2ap020a00f_id[] = {
index ff5996d..32d58e1 100644 (file)
@@ -636,7 +636,7 @@ static int isl29028_probe(struct i2c_client *client,
        return 0;
 }
 
-static int isl29028_remove(struct i2c_client *client)
+static void isl29028_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct isl29028_chip *chip = iio_priv(indio_dev);
@@ -647,8 +647,6 @@ static int isl29028_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        isl29028_clear_configure_reg(chip);
-
-       return 0;
 }
 
 static int isl29028_suspend(struct device *dev)
index eb68a52..c199e63 100644 (file)
@@ -300,15 +300,13 @@ static int isl29125_powerdown(struct isl29125_data *data)
                (data->conf1 & ~ISL29125_MODE_MASK) | ISL29125_MODE_PD);
 }
 
-static int isl29125_remove(struct i2c_client *client)
+static void isl29125_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
        iio_device_unregister(indio_dev);
        iio_triggered_buffer_cleanup(indio_dev);
        isl29125_powerdown(iio_priv(indio_dev));
-
-       return 0;
 }
 
 static int isl29125_suspend(struct device *dev)
index 5387c12..57ce6d7 100644 (file)
@@ -373,7 +373,7 @@ static int jsa1212_power_off(struct jsa1212_data *data)
        return ret;
 }
 
-static int jsa1212_remove(struct i2c_client *client)
+static void jsa1212_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct jsa1212_data *data = iio_priv(indio_dev);
@@ -381,8 +381,6 @@ static int jsa1212_remove(struct i2c_client *client)
        iio_device_unregister(indio_dev);
 
        jsa1212_power_off(data);
-
-       return 0;
 }
 
 static int jsa1212_suspend(struct device *dev)
index 679a1e1..74a1ccd 100644 (file)
@@ -1600,15 +1600,13 @@ powerdown_on_error:
        return ret;
 }
 
-static int ltr501_remove(struct i2c_client *client)
+static void ltr501_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
        iio_device_unregister(indio_dev);
        iio_triggered_buffer_cleanup(indio_dev);
        ltr501_powerdown(iio_priv(indio_dev));
-
-       return 0;
 }
 
 static int ltr501_suspend(struct device *dev)
index a326d47..a26d1c3 100644 (file)
@@ -794,7 +794,7 @@ static int opt3001_probe(struct i2c_client *client,
        return 0;
 }
 
-static int opt3001_remove(struct i2c_client *client)
+static void opt3001_remove(struct i2c_client *client)
 {
        struct iio_dev *iio = i2c_get_clientdata(client);
        struct opt3001 *opt = iio_priv(iio);
@@ -808,7 +808,7 @@ static int opt3001_remove(struct i2c_client *client)
        if (ret < 0) {
                dev_err(opt->dev, "failed to read register %02x\n",
                                OPT3001_CONFIGURATION);
-               return 0;
+               return;
        }
 
        reg = ret;
@@ -820,8 +820,6 @@ static int opt3001_remove(struct i2c_client *client)
                dev_err(opt->dev, "failed to write register %02x\n",
                                OPT3001_CONFIGURATION);
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id opt3001_id[] = {
index 772874e..3cb2de5 100644 (file)
@@ -394,7 +394,7 @@ out_err:
        return ret;
 }
 
-static int pa12203001_remove(struct i2c_client *client)
+static void pa12203001_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        int ret;
@@ -408,8 +408,6 @@ static int pa12203001_remove(struct i2c_client *client)
        if (ret)
                dev_warn(&client->dev, "Failed to power down (%pe)\n",
                         ERR_PTR(ret));
-
-       return 0;
 }
 
 #if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM)
index dabdd05..d1c16dd 100644 (file)
@@ -1041,7 +1041,7 @@ err_poweroff:
        return ret;
 }
 
-static int rpr0521_remove(struct i2c_client *client)
+static void rpr0521_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
@@ -1051,8 +1051,6 @@ static int rpr0521_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        rpr0521_poweroff(iio_priv(indio_dev));
-
-       return 0;
 }
 
 static int rpr0521_runtime_suspend(struct device *dev)
index f7cc7a6..7b8e0da 100644 (file)
@@ -649,14 +649,12 @@ err_standby:
        return ret;
 }
 
-static int stk3310_remove(struct i2c_client *client)
+static void stk3310_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
        iio_device_unregister(indio_dev);
        stk3310_set_state(iio_priv(indio_dev), STK3310_STATE_STANDBY);
-
-       return 0;
 }
 
 static int stk3310_suspend(struct device *dev)
index 823435f..db17fec 100644 (file)
@@ -559,7 +559,7 @@ static int tcs3472_powerdown(struct tcs3472_data *data)
        return ret;
 }
 
-static int tcs3472_remove(struct i2c_client *client)
+static void tcs3472_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
@@ -568,8 +568,6 @@ static int tcs3472_remove(struct i2c_client *client)
                free_irq(client->irq, indio_dev);
        iio_triggered_buffer_cleanup(indio_dev);
        tcs3472_powerdown(iio_priv(indio_dev));
-
-       return 0;
 }
 
 static int tcs3472_suspend(struct device *dev)
index bbb5774..951f35e 100644 (file)
@@ -796,7 +796,7 @@ fail:
        return err;
 }
 
-static int tsl2563_remove(struct i2c_client *client)
+static void tsl2563_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct tsl2563_chip *chip = iio_priv(indio_dev);
@@ -809,8 +809,6 @@ static int tsl2563_remove(struct i2c_client *client)
        i2c_smbus_write_byte_data(chip->client, TSL2563_CMD | TSL2563_REG_INT,
                                  chip->intr);
        tsl2563_set_power(chip, 0);
-
-       return 0;
 }
 
 static int tsl2563_suspend(struct device *dev)
index 82662da..0a2ca1a 100644 (file)
@@ -873,7 +873,7 @@ static int tsl2583_probe(struct i2c_client *clientp,
        return 0;
 }
 
-static int tsl2583_remove(struct i2c_client *client)
+static void tsl2583_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct tsl2583_chip *chip = iio_priv(indio_dev);
@@ -884,8 +884,6 @@ static int tsl2583_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        tsl2583_set_power_state(chip, TSL2583_CNTL_PWR_OFF);
-
-       return 0;
 }
 
 static int tsl2583_suspend(struct device *dev)
index 6ae1b27..090038f 100644 (file)
@@ -207,12 +207,10 @@ static int tsl4531_powerdown(struct i2c_client *client)
                TSL4531_MODE_POWERDOWN);
 }
 
-static int tsl4531_remove(struct i2c_client *client)
+static void tsl4531_remove(struct i2c_client *client)
 {
        iio_device_unregister(i2c_get_clientdata(client));
        tsl4531_powerdown(client);
-
-       return 0;
 }
 
 static int tsl4531_suspend(struct device *dev)
index 80d2299..3e652d7 100644 (file)
@@ -904,7 +904,7 @@ out_err:
 
 }
 
-static int us5182d_remove(struct i2c_client *client)
+static void us5182d_remove(struct i2c_client *client)
 {
        struct us5182d_data *data = iio_priv(i2c_get_clientdata(client));
        int ret;
@@ -918,8 +918,6 @@ static int us5182d_remove(struct i2c_client *client)
        if (ret)
                dev_warn(&client->dev, "Failed to shut down (%pe)\n",
                         ERR_PTR(ret));
-
-       return 0;
 }
 
 static int us5182d_suspend(struct device *dev)
index 3db4e26..f6c83ec 100644 (file)
@@ -1111,7 +1111,7 @@ static const struct of_device_id vcnl_4000_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, vcnl_4000_of_match);
 
-static int vcnl4000_remove(struct i2c_client *client)
+static void vcnl4000_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct vcnl4000_data *data = iio_priv(indio_dev);
@@ -1126,8 +1126,6 @@ static int vcnl4000_remove(struct i2c_client *client)
        if (ret)
                dev_warn(&client->dev, "Failed to power down (%pe)\n",
                         ERR_PTR(ret));
-
-       return 0;
 }
 
 static int vcnl4000_runtime_suspend(struct device *dev)
index 6a196cf..3ed37f6 100644 (file)
@@ -601,7 +601,7 @@ fail_poweroff:
        return ret;
 }
 
-static int vcnl4035_remove(struct i2c_client *client)
+static void vcnl4035_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        int ret;
@@ -616,8 +616,6 @@ static int vcnl4035_remove(struct i2c_client *client)
        if (ret)
                dev_warn(&client->dev, "Failed to put device into standby (%pe)\n",
                         ERR_PTR(ret));
-
-       return 0;
 }
 
 static int vcnl4035_runtime_suspend(struct device *dev)
index 1e55e09..cfa4e9e 100644 (file)
@@ -180,15 +180,13 @@ fail:
        return ret;
 }
 
-static int veml6070_remove(struct i2c_client *client)
+static void veml6070_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct veml6070_data *data = iio_priv(indio_dev);
 
        iio_device_unregister(indio_dev);
        i2c_unregister_device(data->client2);
-
-       return 0;
 }
 
 static const struct i2c_device_id veml6070_id[] = {
index c89a91d..7ec9ab3 100644 (file)
@@ -969,7 +969,7 @@ disable_pm:
        return ret;
 }
 
-static int ak8974_remove(struct i2c_client *i2c)
+static void ak8974_remove(struct i2c_client *i2c)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(i2c);
        struct ak8974 *ak8974 = iio_priv(indio_dev);
@@ -981,8 +981,6 @@ static int ak8974_remove(struct i2c_client *i2c)
        pm_runtime_disable(&i2c->dev);
        ak8974_set_power(ak8974, AK8974_PWR_OFF);
        regulator_bulk_disable(ARRAY_SIZE(ak8974->regs), ak8974->regs);
-
-       return 0;
 }
 
 static int ak8974_runtime_suspend(struct device *dev)
index 2432e69..caf03a2 100644 (file)
@@ -1018,7 +1018,7 @@ power_off:
        return err;
 }
 
-static int ak8975_remove(struct i2c_client *client)
+static void ak8975_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct ak8975_data *data = iio_priv(indio_dev);
@@ -1030,8 +1030,6 @@ static int ak8975_remove(struct i2c_client *client)
        iio_triggered_buffer_cleanup(indio_dev);
        ak8975_set_mode(data, POWER_DOWN);
        ak8975_power_off(data);
-
-       return 0;
 }
 
 static int ak8975_runtime_suspend(struct device *dev)
index 65c0044..570deaa 100644 (file)
@@ -34,11 +34,9 @@ static int bmc150_magn_i2c_probe(struct i2c_client *client,
        return bmc150_magn_probe(&client->dev, regmap, client->irq, name);
 }
 
-static int bmc150_magn_i2c_remove(struct i2c_client *client)
+static void bmc150_magn_i2c_remove(struct i2c_client *client)
 {
        bmc150_magn_remove(&client->dev);
-
-       return 0;
 }
 
 static const struct acpi_device_id bmc150_magn_acpi_match[] = {
index 8d2ff8f..fe5e841 100644 (file)
@@ -65,11 +65,9 @@ static int hmc5843_i2c_probe(struct i2c_client *cli,
                        id->driver_data, id->name);
 }
 
-static int hmc5843_i2c_remove(struct i2c_client *client)
+static void hmc5843_i2c_remove(struct i2c_client *client)
 {
        hmc5843_common_remove(&client->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id hmc5843_id[] = {
index 226439d..b870ad8 100644 (file)
@@ -559,7 +559,7 @@ disable_regulator_vdd:
        return ret;
 }
 
-static int mag3110_remove(struct i2c_client *client)
+static void mag3110_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct mag3110_data *data = iio_priv(indio_dev);
@@ -569,8 +569,6 @@ static int mag3110_remove(struct i2c_client *client)
        mag3110_standby(iio_priv(indio_dev));
        regulator_disable(data->vddio_reg);
        regulator_disable(data->vdd_reg);
-
-       return 0;
 }
 
 static int mag3110_suspend(struct device *dev)
index aeaa4da..c3a1094 100644 (file)
@@ -943,7 +943,7 @@ reg_off:
        return ret;
 }
 
-static int yas5xx_remove(struct i2c_client *i2c)
+static void yas5xx_remove(struct i2c_client *i2c)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(i2c);
        struct yas5xx *yas5xx = iio_priv(indio_dev);
@@ -961,8 +961,6 @@ static int yas5xx_remove(struct i2c_client *i2c)
        pm_runtime_disable(dev);
        gpiod_set_value_cansleep(yas5xx->reset, 1);
        regulator_bulk_disable(ARRAY_SIZE(yas5xx->regs), yas5xx->regs);
-
-       return 0;
 }
 
 static int yas5xx_runtime_suspend(struct device *dev)
index fe514f0..5ec7060 100644 (file)
@@ -384,7 +384,7 @@ error_unreg_trigger:
        return ret;
 }
 
-static int lmp91000_remove(struct i2c_client *client)
+static void lmp91000_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct lmp91000_data *data = iio_priv(indio_dev);
@@ -396,8 +396,6 @@ static int lmp91000_remove(struct i2c_client *client)
 
        iio_triggered_buffer_cleanup(indio_dev);
        iio_trigger_unregister(data->trig);
-
-       return 0;
 }
 
 static const struct of_device_id lmp91000_of_match[] = {
index d4f89e4..2f22aba 100644 (file)
@@ -290,15 +290,13 @@ static int mpl3115_standby(struct mpl3115_data *data)
                data->ctrl_reg1 & ~MPL3115_CTRL_ACTIVE);
 }
 
-static int mpl3115_remove(struct i2c_client *client)
+static void mpl3115_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
        iio_device_unregister(indio_dev);
        iio_triggered_buffer_cleanup(indio_dev);
        mpl3115_standby(iio_priv(indio_dev));
-
-       return 0;
 }
 
 static int mpl3115_suspend(struct device *dev)
index 3b1de71..b681a41 100644 (file)
@@ -105,11 +105,9 @@ static int ms5611_i2c_probe(struct i2c_client *client,
        return ms5611_probe(indio_dev, &client->dev, id->name, id->driver_data);
 }
 
-static int ms5611_i2c_remove(struct i2c_client *client)
+static void ms5611_i2c_remove(struct i2c_client *client)
 {
        ms5611_remove(i2c_get_clientdata(client));
-
-       return 0;
 }
 
 static const struct of_device_id ms5611_i2c_matches[] = {
index 0db0860..f26dd8c 100644 (file)
@@ -53,11 +53,9 @@ static int zpa2326_probe_i2c(struct i2c_client          *client,
                             zpa2326_i2c_hwid(client), regmap);
 }
 
-static int zpa2326_remove_i2c(struct i2c_client *client)
+static void zpa2326_remove_i2c(struct i2c_client *client)
 {
        zpa2326_remove(&client->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id zpa2326_i2c_ids[] = {
index 648ae57..791a33d 100644 (file)
@@ -311,7 +311,7 @@ error_unreg_buffer:
        return ret;
 }
 
-static int lidar_remove(struct i2c_client *client)
+static void lidar_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
 
@@ -320,8 +320,6 @@ static int lidar_remove(struct i2c_client *client)
 
        pm_runtime_disable(&client->dev);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id lidar_id[] = {
index 42589d6..d467086 100644 (file)
@@ -979,7 +979,7 @@ out_trigger_unregister:
        return ret;
 }
 
-static int sx9500_remove(struct i2c_client *client)
+static void sx9500_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct sx9500_data *data = iio_priv(indio_dev);
@@ -989,8 +989,6 @@ static int sx9500_remove(struct i2c_client *client)
        if (client->irq > 0)
                iio_trigger_unregister(data->trig);
        kfree(data->buffer);
-
-       return 0;
 }
 
 static int sx9500_suspend(struct device *dev)
index c253a53..0808bb8 100644 (file)
@@ -571,7 +571,7 @@ static int mlx90614_probe(struct i2c_client *client,
        return iio_device_register(indio_dev);
 }
 
-static int mlx90614_remove(struct i2c_client *client)
+static void mlx90614_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct mlx90614_data *data = iio_priv(indio_dev);
@@ -584,8 +584,6 @@ static int mlx90614_remove(struct i2c_client *client)
                        mlx90614_sleep(data);
                pm_runtime_set_suspended(&client->dev);
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id mlx90614_id[] = {
index 7ee7ff8..e8ef471 100644 (file)
@@ -924,7 +924,7 @@ static int mlx90632_probe(struct i2c_client *client,
        return iio_device_register(indio_dev);
 }
 
-static int mlx90632_remove(struct i2c_client *client)
+static void mlx90632_remove(struct i2c_client *client)
 {
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct mlx90632_data *data = iio_priv(indio_dev);
@@ -936,8 +936,6 @@ static int mlx90632_remove(struct i2c_client *client)
        pm_runtime_put_noidle(&client->dev);
 
        mlx90632_sleep(data);
-
-       return 0;
 }
 
 static const struct i2c_device_id mlx90632_id[] = {
index 34bcd99..2beda29 100644 (file)
@@ -327,7 +327,7 @@ err_free_mem:
        return error;
 }
 
-static int as5011_remove(struct i2c_client *client)
+static void as5011_remove(struct i2c_client *client)
 {
        struct as5011_device *as5011 = i2c_get_clientdata(client);
 
@@ -337,8 +337,6 @@ static int as5011_remove(struct i2c_client *client)
 
        input_unregister_device(as5011->input_dev);
        kfree(as5011);
-
-       return 0;
 }
 
 static const struct i2c_device_id as5011_id[] = {
index 1a1a05d..e271973 100644 (file)
@@ -592,12 +592,11 @@ static int adp5588_probe(struct i2c_client *client,
        return 0;
 }
 
-static int adp5588_remove(struct i2c_client *client)
+static void adp5588_remove(struct i2c_client *client)
 {
        adp5588_write(client, CFG, 0);
 
        /* all resources will be freed by devm */
-       return 0;
 }
 
 static int __maybe_unused adp5588_suspend(struct device *dev)
index 6c38d03..407dd2a 100644 (file)
@@ -752,7 +752,7 @@ fail1:
        return err;
 }
 
-static int lm8323_remove(struct i2c_client *client)
+static void lm8323_remove(struct i2c_client *client)
 {
        struct lm8323_chip *lm = i2c_get_clientdata(client);
        int i;
@@ -769,8 +769,6 @@ static int lm8323_remove(struct i2c_client *client)
                        led_classdev_unregister(&lm->pwm[i].cdev);
 
        kfree(lm);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 7c5f8c6..9dac22c 100644 (file)
@@ -200,15 +200,13 @@ static int lm8333_probe(struct i2c_client *client,
        return err;
 }
 
-static int lm8333_remove(struct i2c_client *client)
+static void lm8333_remove(struct i2c_client *client)
 {
        struct lm8333 *lm8333 = i2c_get_clientdata(client);
 
        free_irq(client->irq, lm8333);
        input_unregister_device(lm8333->input);
        kfree(lm8333);
-
-       return 0;
 }
 
 static const struct i2c_device_id lm8333_id[] = {
index 8cb0062..ac1637a 100644 (file)
@@ -194,7 +194,7 @@ err_free_mem:
        return error;
 }
 
-static int mcs_touchkey_remove(struct i2c_client *client)
+static void mcs_touchkey_remove(struct i2c_client *client)
 {
        struct mcs_touchkey_data *data = i2c_get_clientdata(client);
 
@@ -203,8 +203,6 @@ static int mcs_touchkey_remove(struct i2c_client *client)
                data->poweron(false);
        input_unregister_device(data->input_dev);
        kfree(data);
-
-       return 0;
 }
 
 static void mcs_touchkey_shutdown(struct i2c_client *client)
index 7174e1d..9fcce18 100644 (file)
@@ -216,7 +216,7 @@ err_free_mem:
        return err;
 }
 
-static int qt1070_remove(struct i2c_client *client)
+static void qt1070_remove(struct i2c_client *client)
 {
        struct qt1070_data *data = i2c_get_clientdata(client);
 
@@ -225,8 +225,6 @@ static int qt1070_remove(struct i2c_client *client)
 
        input_unregister_device(data->input);
        kfree(data);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 32d4a07..382b151 100644 (file)
@@ -432,7 +432,7 @@ err_free_mem:
        return error;
 }
 
-static int qt2160_remove(struct i2c_client *client)
+static void qt2160_remove(struct i2c_client *client)
 {
        struct qt2160_data *qt2160 = i2c_get_clientdata(client);
 
@@ -446,8 +446,6 @@ static int qt2160_remove(struct i2c_client *client)
 
        input_unregister_device(qt2160->input);
        kfree(qt2160);
-
-       return 0;
 }
 
 static const struct i2c_device_id qt2160_idtable[] = {
index 2a97559..afcdfbb 100644 (file)
@@ -307,7 +307,7 @@ fail1:
        return error;
 }
 
-static int tca6416_keypad_remove(struct i2c_client *client)
+static void tca6416_keypad_remove(struct i2c_client *client)
 {
        struct tca6416_keypad_chip *chip = i2c_get_clientdata(client);
 
@@ -318,8 +318,6 @@ static int tca6416_keypad_remove(struct i2c_client *client)
 
        input_unregister_device(chip->input);
        kfree(chip);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index a3b5f88..5be636a 100644 (file)
@@ -99,13 +99,11 @@ static int adxl34x_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int adxl34x_i2c_remove(struct i2c_client *client)
+static void adxl34x_i2c_remove(struct i2c_client *client)
 {
        struct adxl34x *ac = i2c_get_clientdata(client);
 
        adxl34x_remove(ac);
-
-       return 0;
 }
 
 static int __maybe_unused adxl34x_i2c_suspend(struct device *dev)
index a9d984d..84fe394 100644 (file)
@@ -513,11 +513,9 @@ static int bma150_probe(struct i2c_client *client,
        return 0;
 }
 
-static int bma150_remove(struct i2c_client *client)
+static void bma150_remove(struct i2c_client *client)
 {
        pm_runtime_disable(&client->dev);
-
-       return 0;
 }
 
 static int __maybe_unused bma150_suspend(struct device *dev)
index 03fb491..3b23210 100644 (file)
@@ -58,13 +58,11 @@ static int cma3000_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int cma3000_i2c_remove(struct i2c_client *client)
+static void cma3000_i2c_remove(struct i2c_client *client)
 {
        struct cma3000_accl_data *data = i2c_get_clientdata(client);
 
        cma3000_exit(data);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index abc4231..cfd6640 100644 (file)
@@ -157,7 +157,7 @@ static int pcf8574_kp_probe(struct i2c_client *client, const struct i2c_device_i
        return ret;
 }
 
-static int pcf8574_kp_remove(struct i2c_client *client)
+static void pcf8574_kp_remove(struct i2c_client *client)
 {
        struct kp_data *lp = i2c_get_clientdata(client);
 
@@ -165,8 +165,6 @@ static int pcf8574_kp_remove(struct i2c_client *client)
 
        input_unregister_device(lp->idev);
        kfree(lp);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index fa30464..987ee67 100644 (file)
@@ -587,7 +587,7 @@ err_mem_free:
        return ret;
 }
 
-static int synaptics_i2c_remove(struct i2c_client *client)
+static void synaptics_i2c_remove(struct i2c_client *client)
 {
        struct synaptics_i2c *touch = i2c_get_clientdata(client);
 
@@ -596,8 +596,6 @@ static int synaptics_i2c_remove(struct i2c_client *client)
 
        input_unregister_device(touch->input);
        kfree(touch);
-
-       return 0;
 }
 
 static int __maybe_unused synaptics_i2c_suspend(struct device *dev)
index 2407ea4..c130468 100644 (file)
@@ -338,13 +338,11 @@ static int rmi_smb_probe(struct i2c_client *client,
        return 0;
 }
 
-static int rmi_smb_remove(struct i2c_client *client)
+static void rmi_smb_remove(struct i2c_client *client)
 {
        struct rmi_smb_xport *rmi_smb = i2c_get_clientdata(client);
 
        rmi_unregister_transport_device(&rmi_smb->xport);
-
-       return 0;
 }
 
 static int __maybe_unused rmi_smb_suspend(struct device *dev)
index eb66cd2..4eedea0 100644 (file)
@@ -3284,7 +3284,7 @@ err_disable_regulators:
        return error;
 }
 
-static int mxt_remove(struct i2c_client *client)
+static void mxt_remove(struct i2c_client *client)
 {
        struct mxt_data *data = i2c_get_clientdata(client);
 
@@ -3294,8 +3294,6 @@ static int mxt_remove(struct i2c_client *client)
        mxt_free_object_table(data);
        regulator_bulk_disable(ARRAY_SIZE(data->regulators),
                               data->regulators);
-
-       return 0;
 }
 
 static int __maybe_unused mxt_suspend(struct device *dev)
index 2f1f0d7..34f422e 100644 (file)
@@ -552,15 +552,13 @@ static int bu21013_probe(struct i2c_client *client,
        return 0;
 }
 
-static int bu21013_remove(struct i2c_client *client)
+static void bu21013_remove(struct i2c_client *client)
 {
        struct bu21013_ts *ts = i2c_get_clientdata(client);
 
        /* Make sure IRQ will exit quickly even if there is contact */
        ts->touch_stopped = true;
        /* The resources will be freed by devm */
-
-       return 0;
 }
 
 static int __maybe_unused bu21013_suspend(struct device *dev)
index c65ccb2..28ae7c1 100644 (file)
@@ -43,13 +43,11 @@ static int cyttsp4_i2c_probe(struct i2c_client *client,
        return PTR_ERR_OR_ZERO(ts);
 }
 
-static int cyttsp4_i2c_remove(struct i2c_client *client)
+static void cyttsp4_i2c_remove(struct i2c_client *client)
 {
        struct cyttsp4 *ts = i2c_get_clientdata(client);
 
        cyttsp4_remove(ts);
-
-       return 0;
 }
 
 static const struct i2c_device_id cyttsp4_i2c_id[] = {
index 82beddb..5fb4413 100644 (file)
@@ -1346,13 +1346,11 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
        return 0;
 }
 
-static int edt_ft5x06_ts_remove(struct i2c_client *client)
+static void edt_ft5x06_ts_remove(struct i2c_client *client)
 {
        struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
 
        edt_ft5x06_ts_teardown_debugfs(tsdata);
-
-       return 0;
 }
 
 static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev)
index 21c0ddd..a33cc79 100644 (file)
@@ -1383,14 +1383,12 @@ reset:
        return 0;
 }
 
-static int goodix_ts_remove(struct i2c_client *client)
+static void goodix_ts_remove(struct i2c_client *client)
 {
        struct goodix_ts_data *ts = i2c_get_clientdata(client);
 
        if (ts->load_cfg_from_disk)
                wait_for_completion(&ts->firmware_loading_complete);
-
-       return 0;
 }
 
 static int __maybe_unused goodix_suspend(struct device *dev)
index 42d3fd7..79cd660 100644 (file)
@@ -176,7 +176,7 @@ static int migor_ts_probe(struct i2c_client *client,
        return error;
 }
 
-static int migor_ts_remove(struct i2c_client *client)
+static void migor_ts_remove(struct i2c_client *client)
 {
        struct migor_ts_priv *priv = i2c_get_clientdata(client);
 
@@ -185,8 +185,6 @@ static int migor_ts_remove(struct i2c_client *client)
        kfree(priv);
 
        dev_set_drvdata(&client->dev, NULL);
-
-       return 0;
 }
 
 static int __maybe_unused migor_ts_suspend(struct device *dev)
index 85a1f46..1a7d002 100644 (file)
@@ -475,11 +475,9 @@ static int s6sy761_probe(struct i2c_client *client,
        return 0;
 }
 
-static int s6sy761_remove(struct i2c_client *client)
+static void s6sy761_remove(struct i2c_client *client)
 {
        pm_runtime_disable(&client->dev);
-
-       return 0;
 }
 
 static int __maybe_unused s6sy761_runtime_suspend(struct device *dev)
index c175d44..d5bd170 100644 (file)
@@ -738,11 +738,9 @@ static int stmfts_probe(struct i2c_client *client,
        return 0;
 }
 
-static int stmfts_remove(struct i2c_client *client)
+static void stmfts_remove(struct i2c_client *client)
 {
        pm_runtime_disable(&client->dev);
-
-       return 0;
 }
 
 static int __maybe_unused stmfts_runtime_suspend(struct device *dev)
index 9fdd870..a956535 100644 (file)
@@ -43,11 +43,9 @@ static int tsc2004_probe(struct i2c_client *i2c,
                             tsc2004_cmd);
 }
 
-static int tsc2004_remove(struct i2c_client *i2c)
+static void tsc2004_remove(struct i2c_client *i2c)
 {
        tsc200x_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id tsc2004_idtable[] = {
index aa3f82b..bb22497 100644 (file)
@@ -724,7 +724,7 @@ out_put_nodes:
        return rval;
 }
 
-static int as3645a_remove(struct i2c_client *client)
+static void as3645a_remove(struct i2c_client *client)
 {
        struct as3645a *flash = i2c_get_clientdata(client);
 
@@ -740,8 +740,6 @@ static int as3645a_remove(struct i2c_client *client)
 
        fwnode_handle_put(flash->flash_node);
        fwnode_handle_put(flash->indicator_node);
-
-       return 0;
 }
 
 static const struct i2c_device_id as3645a_id_table[] = {
index d0e1d48..78730e0 100644 (file)
@@ -440,15 +440,16 @@ static int lm3601x_probe(struct i2c_client *client)
        return lm3601x_register_leds(led, fwnode);
 }
 
-static int lm3601x_remove(struct i2c_client *client)
+static void lm3601x_remove(struct i2c_client *client)
 {
        struct lm3601x_led *led = i2c_get_clientdata(client);
+       int ret;
 
-       mutex_destroy(&led->lock);
-
-       return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,
-                          LM3601X_ENABLE_MASK,
-                          LM3601X_MODE_STANDBY);
+       ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,
+                                LM3601X_ENABLE_MASK, LM3601X_MODE_STANDBY);
+       if (ret)
+               dev_warn(&client->dev,
+                        "Failed to put into standby (%pe)\n", ERR_PTR(ret));
 }
 
 static const struct i2c_device_id lm3601x_id[] = {
index ee129ab..e404fe8 100644 (file)
@@ -393,12 +393,11 @@ static int rt4505_probe(struct i2c_client *client)
        return 0;
 }
 
-static int rt4505_remove(struct i2c_client *client)
+static void rt4505_remove(struct i2c_client *client)
 {
        struct rt4505_priv *priv = i2c_get_clientdata(client);
 
        v4l2_flash_release(priv->v4l2_flash);
-       return 0;
 }
 
 static void rt4505_shutdown(struct i2c_client *client)
index a0df1fb..e072ee5 100644 (file)
@@ -334,13 +334,11 @@ exit:
        return err;
 }
 
-static int an30259a_remove(struct i2c_client *client)
+static void an30259a_remove(struct i2c_client *client)
 {
        struct an30259a *chip = i2c_get_clientdata(client);
 
        mutex_destroy(&chip->mutex);
-
-       return 0;
 }
 
 static const struct of_device_id an30259a_match_table[] = {
index 80d9374..0b52fc9 100644 (file)
@@ -401,15 +401,13 @@ error:
        return ret;
 }
 
-static int aw2013_remove(struct i2c_client *client)
+static void aw2013_remove(struct i2c_client *client)
 {
        struct aw2013 *chip = i2c_get_clientdata(client);
 
        aw2013_chip_disable(chip);
 
        mutex_destroy(&chip->mutex);
-
-       return 0;
 }
 
 static const struct of_device_id aw2013_match_table[] = {
index 8bbaef5..2b6678f 100644 (file)
@@ -722,7 +722,7 @@ failed_unregister_dev_file:
        return ret;
 }
 
-static int bd2802_remove(struct i2c_client *client)
+static void bd2802_remove(struct i2c_client *client)
 {
        struct bd2802_led *led = i2c_get_clientdata(client);
        int i;
@@ -733,8 +733,6 @@ static int bd2802_remove(struct i2c_client *client)
                bd2802_disable_adv_conf(led);
        for (i = 0; i < ARRAY_SIZE(bd2802_attributes); i++)
                device_remove_file(&led->client->dev, bd2802_attributes[i]);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index bd7d0d5..3fb6a2f 100644 (file)
@@ -677,7 +677,7 @@ exit:
        return err;
 }
 
-static int blinkm_remove(struct i2c_client *client)
+static void blinkm_remove(struct i2c_client *client)
 {
        struct blinkm_data *data = i2c_get_clientdata(client);
        int ret = 0;
@@ -716,7 +716,6 @@ static int blinkm_remove(struct i2c_client *client)
                dev_err(&client->dev, "Failure in blinkm_remove ignored. Continuing.\n");
 
        sysfs_remove_group(&client->dev.kobj, &blinkm_group);
-       return 0;
 }
 
 static const struct i2c_device_id blinkm_id[] = {
index fc63fce..0d219c1 100644 (file)
@@ -457,7 +457,7 @@ static int is31fl32xx_probe(struct i2c_client *client,
        return 0;
 }
 
-static int is31fl32xx_remove(struct i2c_client *client)
+static void is31fl32xx_remove(struct i2c_client *client)
 {
        struct is31fl32xx_priv *priv = i2c_get_clientdata(client);
        int ret;
@@ -466,8 +466,6 @@ static int is31fl32xx_remove(struct i2c_client *client)
        if (ret)
                dev_err(&client->dev, "Failed to reset registers on removal (%pe)\n",
                        ERR_PTR(ret));
-
-       return 0;
 }
 
 /*
index e723935..ba906c2 100644 (file)
@@ -470,13 +470,12 @@ static int lm3530_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lm3530_remove(struct i2c_client *client)
+static void lm3530_remove(struct i2c_client *client)
 {
        struct lm3530_data *drvdata = i2c_get_clientdata(client);
 
        lm3530_led_disable(drvdata);
        led_classdev_unregister(&drvdata->led_dev);
-       return 0;
 }
 
 static const struct i2c_device_id lm3530_id[] = {
index beb5304..db64d44 100644 (file)
@@ -704,7 +704,7 @@ static int lm3532_probe(struct i2c_client *client,
        return ret;
 }
 
-static int lm3532_remove(struct i2c_client *client)
+static void lm3532_remove(struct i2c_client *client)
 {
        struct lm3532_data *drvdata = i2c_get_clientdata(client);
 
@@ -712,8 +712,6 @@ static int lm3532_remove(struct i2c_client *client)
 
        if (drvdata->enable_gpio)
                gpiod_direction_output(drvdata->enable_gpio, 0);
-
-       return 0;
 }
 
 static const struct of_device_id of_lm3532_leds_match[] = {
index 2d3e118..daa3592 100644 (file)
@@ -491,7 +491,7 @@ err_out:
        return err;
 }
 
-static int lm355x_remove(struct i2c_client *client)
+static void lm355x_remove(struct i2c_client *client)
 {
        struct lm355x_chip_data *chip = i2c_get_clientdata(client);
        struct lm355x_reg_data *preg = chip->regs;
@@ -501,8 +501,6 @@ static int lm355x_remove(struct i2c_client *client)
        led_classdev_unregister(&chip->cdev_torch);
        led_classdev_unregister(&chip->cdev_flash);
        dev_info(&client->dev, "%s is removed\n", lm355x_name[chip->type]);
-
-       return 0;
 }
 
 static const struct i2c_device_id lm355x_id[] = {
index 4353091..428a5d9 100644 (file)
@@ -380,7 +380,7 @@ err_out:
        return err;
 }
 
-static int lm3642_remove(struct i2c_client *client)
+static void lm3642_remove(struct i2c_client *client)
 {
        struct lm3642_chip_data *chip = i2c_get_clientdata(client);
 
@@ -388,7 +388,6 @@ static int lm3642_remove(struct i2c_client *client)
        led_classdev_unregister(&chip->cdev_torch);
        led_classdev_unregister(&chip->cdev_flash);
        regmap_write(chip->regmap, REG_ENABLE, 0);
-       return 0;
 }
 
 static const struct i2c_device_id lm3642_id[] = {
index 87cd24c..54b4662 100644 (file)
@@ -491,14 +491,12 @@ static int lm3692x_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lm3692x_remove(struct i2c_client *client)
+static void lm3692x_remove(struct i2c_client *client)
 {
        struct lm3692x_led *led = i2c_get_clientdata(client);
 
        lm3692x_leds_disable(led);
        mutex_destroy(&led->lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id lm3692x_id[] = {
index a8c9322..71231a6 100644 (file)
@@ -337,7 +337,7 @@ static int lm3697_probe(struct i2c_client *client,
        return lm3697_init(led);
 }
 
-static int lm3697_remove(struct i2c_client *client)
+static void lm3697_remove(struct i2c_client *client)
 {
        struct lm3697 *led = i2c_get_clientdata(client);
        struct device *dev = &led->client->dev;
@@ -345,10 +345,8 @@ static int lm3697_remove(struct i2c_client *client)
 
        ret = regmap_update_bits(led->regmap, LM3697_CTRL_ENABLE,
                                 LM3697_CTRL_A_B_EN, 0);
-       if (ret) {
+       if (ret)
                dev_err(dev, "Failed to disable the device\n");
-               return ret;
-       }
 
        if (led->enable_gpio)
                gpiod_direction_output(led->enable_gpio, 0);
@@ -360,8 +358,6 @@ static int lm3697_remove(struct i2c_client *client)
        }
 
        mutex_destroy(&led->lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id lm3697_id[] = {
index 437c711..673ad8c 100644 (file)
@@ -397,7 +397,7 @@ static int lp3944_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lp3944_remove(struct i2c_client *client)
+static void lp3944_remove(struct i2c_client *client)
 {
        struct lp3944_platform_data *pdata = dev_get_platdata(&client->dev);
        struct lp3944_data *data = i2c_get_clientdata(client);
@@ -414,8 +414,6 @@ static int lp3944_remove(struct i2c_client *client)
                default:
                        break;
                }
-
-       return 0;
 }
 
 /* lp3944 i2c driver struct */
index 6ee9131..bf0ad1b 100644 (file)
@@ -255,15 +255,13 @@ static int lp3952_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lp3952_remove(struct i2c_client *client)
+static void lp3952_remove(struct i2c_client *client)
 {
        struct lp3952_led_array *priv;
 
        priv = i2c_get_clientdata(client);
        lp3952_on_off(priv, LP3952_LED_ALL, false);
        gpiod_set_value(priv->enable_gpio, 0);
-
-       return 0;
 }
 
 static const struct i2c_device_id lp3952_id[] = {
index e129dcc..28d6b39 100644 (file)
@@ -563,7 +563,7 @@ static int lp50xx_probe(struct i2c_client *client)
        return lp50xx_probe_dt(led);
 }
 
-static int lp50xx_remove(struct i2c_client *client)
+static void lp50xx_remove(struct i2c_client *client)
 {
        struct lp50xx *led = i2c_get_clientdata(client);
        int ret;
@@ -579,8 +579,6 @@ static int lp50xx_remove(struct i2c_client *client)
        }
 
        mutex_destroy(&led->lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id lp50xx_id[] = {
index a9e7507..7ff20c2 100644 (file)
@@ -579,7 +579,7 @@ err_init:
        return ret;
 }
 
-static int lp5521_remove(struct i2c_client *client)
+static void lp5521_remove(struct i2c_client *client)
 {
        struct lp55xx_led *led = i2c_get_clientdata(client);
        struct lp55xx_chip *chip = led->chip;
@@ -587,8 +587,6 @@ static int lp5521_remove(struct i2c_client *client)
        lp5521_stop_all_engines(chip);
        lp55xx_unregister_sysfs(chip);
        lp55xx_deinit_device(chip);
-
-       return 0;
 }
 
 static const struct i2c_device_id lp5521_id[] = {
index b1590cb..369d40b 100644 (file)
@@ -947,7 +947,7 @@ err_init:
        return ret;
 }
 
-static int lp5523_remove(struct i2c_client *client)
+static void lp5523_remove(struct i2c_client *client)
 {
        struct lp55xx_led *led = i2c_get_clientdata(client);
        struct lp55xx_chip *chip = led->chip;
@@ -955,8 +955,6 @@ static int lp5523_remove(struct i2c_client *client)
        lp5523_stop_all_engines(chip);
        lp55xx_unregister_sysfs(chip);
        lp55xx_deinit_device(chip);
-
-       return 0;
 }
 
 static const struct i2c_device_id lp5523_id[] = {
index 31c1401..0e49008 100644 (file)
@@ -573,7 +573,7 @@ err_init:
        return ret;
 }
 
-static int lp5562_remove(struct i2c_client *client)
+static void lp5562_remove(struct i2c_client *client)
 {
        struct lp55xx_led *led = i2c_get_clientdata(client);
        struct lp55xx_chip *chip = led->chip;
@@ -582,8 +582,6 @@ static int lp5562_remove(struct i2c_client *client)
 
        lp55xx_unregister_sysfs(chip);
        lp55xx_deinit_device(chip);
-
-       return 0;
 }
 
 static const struct i2c_device_id lp5562_id[] = {
index 2d2fda2..ae11a02 100644 (file)
@@ -362,7 +362,7 @@ err_init:
        return ret;
 }
 
-static int lp8501_remove(struct i2c_client *client)
+static void lp8501_remove(struct i2c_client *client)
 {
        struct lp55xx_led *led = i2c_get_clientdata(client);
        struct lp55xx_chip *chip = led->chip;
@@ -370,8 +370,6 @@ static int lp8501_remove(struct i2c_client *client)
        lp8501_stop_engine(chip);
        lp55xx_unregister_sysfs(chip);
        lp55xx_deinit_device(chip);
-
-       return 0;
 }
 
 static const struct i2c_device_id lp8501_id[] = {
index 3c693d5..e2b36d3 100644 (file)
@@ -445,7 +445,7 @@ static int lp8860_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lp8860_remove(struct i2c_client *client)
+static void lp8860_remove(struct i2c_client *client)
 {
        struct lp8860_led *led = i2c_get_clientdata(client);
        int ret;
@@ -461,8 +461,6 @@ static int lp8860_remove(struct i2c_client *client)
        }
 
        mutex_destroy(&led->lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id lp8860_id[] = {
index f72b5d1..df83d97 100644 (file)
@@ -52,7 +52,7 @@ struct pca9532_data {
 
 static int pca9532_probe(struct i2c_client *client,
        const struct i2c_device_id *id);
-static int pca9532_remove(struct i2c_client *client);
+static void pca9532_remove(struct i2c_client *client);
 
 enum {
        pca9530,
@@ -546,13 +546,11 @@ static int pca9532_probe(struct i2c_client *client,
        return pca9532_configure(client, data, pca9532_pdata);
 }
 
-static int pca9532_remove(struct i2c_client *client)
+static void pca9532_remove(struct i2c_client *client)
 {
        struct pca9532_data *data = i2c_get_clientdata(client);
 
        pca9532_destroy_devices(data, data->chip_info->num_leds);
-
-       return 0;
 }
 
 module_i2c_driver(pca9532_driver);
index 1473ced..161bef6 100644 (file)
@@ -790,7 +790,7 @@ exit:
        return err;
 }
 
-static int tca6507_remove(struct i2c_client *client)
+static void tca6507_remove(struct i2c_client *client)
 {
        int i;
        struct tca6507_chip *tca = i2c_get_clientdata(client);
@@ -802,8 +802,6 @@ static int tca6507_remove(struct i2c_client *client)
        }
        tca6507_remove_gpio(tca);
        cancel_work_sync(&tca->work);
-
-       return 0;
 }
 
 static struct i2c_driver tca6507_driver = {
index eac6f4a..c7c9851 100644 (file)
@@ -242,7 +242,7 @@ static int omnia_leds_probe(struct i2c_client *client,
        return 0;
 }
 
-static int omnia_leds_remove(struct i2c_client *client)
+static void omnia_leds_remove(struct i2c_client *client)
 {
        u8 buf[5];
 
@@ -258,8 +258,6 @@ static int omnia_leds_remove(struct i2c_client *client)
        buf[4] = 255;
 
        i2c_master_send(client, buf, 5);
-
-       return 0;
 }
 
 static const struct of_device_id of_omnia_leds_match[] = {
index d2f0cde..3ded340 100644 (file)
@@ -58,7 +58,7 @@ enum ams_i2c_cmd {
 
 static int ams_i2c_probe(struct i2c_client *client,
                         const struct i2c_device_id *id);
-static int ams_i2c_remove(struct i2c_client *client);
+static void ams_i2c_remove(struct i2c_client *client);
 
 static const struct i2c_device_id ams_id[] = {
        { "MAC,accelerometer_1", 0 },
@@ -230,7 +230,7 @@ static int ams_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int ams_i2c_remove(struct i2c_client *client)
+static void ams_i2c_remove(struct i2c_client *client)
 {
        if (ams_info.has_device) {
                ams_sensor_detach();
@@ -245,8 +245,6 @@ static int ams_i2c_remove(struct i2c_client *client)
 
                ams_info.has_device = 0;
        }
-
-       return 0;
 }
 
 static void ams_i2c_exit(void)
index e604cbc..b004ea2 100644 (file)
@@ -563,7 +563,7 @@ static int probe_thermostat(struct i2c_client *client,
        return 0;
 }
 
-static int remove_thermostat(struct i2c_client *client)
+static void remove_thermostat(struct i2c_client *client)
 {
        struct thermostat *th = i2c_get_clientdata(client);
        int i;
@@ -585,8 +585,6 @@ static int remove_thermostat(struct i2c_client *client)
        write_both_fan_speed(th, -1);
 
        kfree(th);
-
-       return 0;
 }
 
 static const struct i2c_device_id therm_adt746x_id[] = {
index 9226b74..61fe2ab 100644 (file)
@@ -334,7 +334,7 @@ static void do_attach(struct i2c_adapter *adapter)
        }
 }
 
-static int
+static void
 do_remove(struct i2c_client *client)
 {
        if (x.running) {
@@ -348,8 +348,6 @@ do_remove(struct i2c_client *client)
                x.fan = NULL;
        else
                printk(KERN_ERR "g4fan: bad client\n");
-
-       return 0;
 }
 
 static int
index 6ad6441..c5c54a4 100644 (file)
@@ -289,7 +289,7 @@ static int wf_ad7417_probe(struct i2c_client *client,
        return 0;
 }
 
-static int wf_ad7417_remove(struct i2c_client *client)
+static void wf_ad7417_remove(struct i2c_client *client)
 {
        struct wf_ad7417_priv *pv = dev_get_drvdata(&client->dev);
        int i;
@@ -302,8 +302,6 @@ static int wf_ad7417_remove(struct i2c_client *client)
                wf_unregister_sensor(&pv->sensors[i]);
 
        kref_put(&pv->ref, wf_ad7417_release);
-
-       return 0;
 }
 
 static const struct i2c_device_id wf_ad7417_id[] = {
index 82e7b20..c5b1ca5 100644 (file)
@@ -560,7 +560,7 @@ static int wf_fcu_probe(struct i2c_client *client,
        return 0;
 }
 
-static int wf_fcu_remove(struct i2c_client *client)
+static void wf_fcu_remove(struct i2c_client *client)
 {
        struct wf_fcu_priv *pv = dev_get_drvdata(&client->dev);
        struct wf_fcu_fan *fan;
@@ -571,7 +571,6 @@ static int wf_fcu_remove(struct i2c_client *client)
                wf_unregister_control(&fan->ctrl);
        }
        kref_put(&pv->ref, wf_fcu_release);
-       return 0;
 }
 
 static const struct i2c_device_id wf_fcu_id[] = {
index eb7e7f0..204661c 100644 (file)
@@ -147,7 +147,7 @@ static int wf_lm75_probe(struct i2c_client *client,
        return rc;
 }
 
-static int wf_lm75_remove(struct i2c_client *client)
+static void wf_lm75_remove(struct i2c_client *client)
 {
        struct wf_lm75_sensor *lm = i2c_get_clientdata(client);
 
@@ -156,8 +156,6 @@ static int wf_lm75_remove(struct i2c_client *client)
 
        /* release sensor */
        wf_unregister_sensor(&lm->sens);
-
-       return 0;
 }
 
 static const struct i2c_device_id wf_lm75_id[] = {
index 807efdd..40d2546 100644 (file)
@@ -145,7 +145,7 @@ static int wf_lm87_probe(struct i2c_client *client,
        return rc;
 }
 
-static int wf_lm87_remove(struct i2c_client *client)
+static void wf_lm87_remove(struct i2c_client *client)
 {
        struct wf_lm87_sensor *lm = i2c_get_clientdata(client);
 
@@ -154,8 +154,6 @@ static int wf_lm87_remove(struct i2c_client *client)
 
        /* release sensor */
        wf_unregister_sensor(&lm->sens);
-
-       return 0;
 }
 
 static const struct i2c_device_id wf_lm87_id[] = {
index 55ee417..c0d404e 100644 (file)
@@ -104,14 +104,12 @@ static int wf_max6690_probe(struct i2c_client *client,
        return rc;
 }
 
-static int wf_max6690_remove(struct i2c_client *client)
+static void wf_max6690_remove(struct i2c_client *client)
 {
        struct wf_6690_sensor *max = i2c_get_clientdata(client);
 
        max->i2c = NULL;
        wf_unregister_sensor(&max->sens);
-
-       return 0;
 }
 
 static const struct i2c_device_id wf_max6690_id[] = {
index 5ade627..be5d459 100644 (file)
@@ -316,7 +316,7 @@ static int wf_sat_probe(struct i2c_client *client,
        return 0;
 }
 
-static int wf_sat_remove(struct i2c_client *client)
+static void wf_sat_remove(struct i2c_client *client)
 {
        struct wf_sat *sat = i2c_get_clientdata(client);
        struct wf_sat_sensor *sens;
@@ -330,8 +330,6 @@ static int wf_sat_remove(struct i2c_client *client)
        }
        sat->i2c = NULL;
        kref_put(&sat->ref, wf_sat_release);
-
-       return 0;
 }
 
 static const struct i2c_device_id wf_sat_id[] = {
index 0814338..34fad71 100644 (file)
@@ -565,7 +565,7 @@ err_mutex:
        return ret;
 }
 
-static int ch7322_remove(struct i2c_client *client)
+static void ch7322_remove(struct i2c_client *client)
 {
        struct ch7322 *ch7322 = i2c_get_clientdata(client);
 
@@ -578,8 +578,6 @@ static int ch7322_remove(struct i2c_client *client)
        mutex_destroy(&ch7322->mutex);
 
        dev_info(&client->dev, "device unregistered\n");
-
-       return 0;
 }
 
 static const struct of_device_id ch7322_of_match[] = {
index 57f52c0..ba38783 100644 (file)
@@ -98,14 +98,13 @@ err:
        return ret;
 }
 
-static int a8293_remove(struct i2c_client *client)
+static void a8293_remove(struct i2c_client *client)
 {
        struct a8293_dev *dev = i2c_get_clientdata(client);
 
        dev_dbg(&client->dev, "\n");
 
        kfree(dev);
-       return 0;
 }
 
 static const struct i2c_device_id a8293_id_table[] = {
index 7d7c341..d859295 100644 (file)
@@ -1540,7 +1540,7 @@ err:
        return ret;
 }
 
-static int af9013_remove(struct i2c_client *client)
+static void af9013_remove(struct i2c_client *client)
 {
        struct af9013_state *state = i2c_get_clientdata(client);
 
@@ -1551,8 +1551,6 @@ static int af9013_remove(struct i2c_client *client)
        regmap_exit(state->regmap);
 
        kfree(state);
-
-       return 0;
 }
 
 static const struct i2c_device_id af9013_id_table[] = {
index 785c49b..808da7a 100644 (file)
@@ -1163,7 +1163,7 @@ err:
        return ret;
 }
 
-static int af9033_remove(struct i2c_client *client)
+static void af9033_remove(struct i2c_client *client)
 {
        struct af9033_dev *dev = i2c_get_clientdata(client);
 
@@ -1171,8 +1171,6 @@ static int af9033_remove(struct i2c_client *client)
 
        regmap_exit(dev->regmap);
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id af9033_id_table[] = {
index 8cdca05..e4f99bd 100644 (file)
@@ -758,13 +758,12 @@ static int au8522_probe(struct i2c_client *client,
        return 0;
 }
 
-static int au8522_remove(struct i2c_client *client)
+static void au8522_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        au8522_release_state(to_state(sd));
-       return 0;
 }
 
 static const struct i2c_device_id au8522_id[] = {
index 1c8207a..fbc666f 100644 (file)
@@ -664,14 +664,12 @@ err:
        return ret;
 }
 
-static int cxd2099_remove(struct i2c_client *client)
+static void cxd2099_remove(struct i2c_client *client)
 {
        struct cxd *ci = i2c_get_clientdata(client);
 
        regmap_exit(ci->regmap);
        kfree(ci);
-
-       return 0;
 }
 
 static const struct i2c_device_id cxd2099_id[] = {
index b161833..5d98222 100644 (file)
@@ -705,7 +705,7 @@ err:
        return ret;
 }
 
-static int cxd2820r_remove(struct i2c_client *client)
+static void cxd2820r_remove(struct i2c_client *client)
 {
        struct cxd2820r_priv *priv = i2c_get_clientdata(client);
 
@@ -721,8 +721,6 @@ static int cxd2820r_remove(struct i2c_client *client)
        regmap_exit(priv->regmap[0]);
 
        kfree(priv);
-
-       return 0;
 }
 
 static const struct i2c_device_id cxd2820r_id_table[] = {
index d45b4dd..baf2a37 100644 (file)
@@ -899,14 +899,13 @@ dvb_pll_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return 0;
 }
 
-static int dvb_pll_remove(struct i2c_client *client)
+static void dvb_pll_remove(struct i2c_client *client)
 {
        struct dvb_frontend *fe = i2c_get_clientdata(client);
        struct dvb_pll_priv *priv = fe->tuner_priv;
 
        ida_simple_remove(&pll_ida, priv->nr);
        dvb_pll_release(fe);
-       return 0;
 }
 
 
index 136b76c..424311a 100644 (file)
@@ -2226,7 +2226,7 @@ fail:
        return ret;
 }
 
-static int lgdt3306a_remove(struct i2c_client *client)
+static void lgdt3306a_remove(struct i2c_client *client)
 {
        struct lgdt3306a_state *state = i2c_get_clientdata(client);
 
@@ -2237,8 +2237,6 @@ static int lgdt3306a_remove(struct i2c_client *client)
 
        kfree(state->cfg);
        kfree(state);
-
-       return 0;
 }
 
 static const struct i2c_device_id lgdt3306a_id_table[] = {
index da3a8c5..ea9ae22 100644 (file)
@@ -974,15 +974,13 @@ static const struct dvb_frontend_ops lgdt3303_ops = {
        .release              = lgdt330x_release,
 };
 
-static int lgdt330x_remove(struct i2c_client *client)
+static void lgdt330x_remove(struct i2c_client *client)
 {
        struct lgdt330x_state *state = i2c_get_clientdata(client);
 
        dev_dbg(&client->dev, "\n");
 
        kfree(state);
-
-       return 0;
 }
 
 static const struct i2c_device_id lgdt330x_id_table[] = {
index bce0f42..4e844b2 100644 (file)
@@ -1914,7 +1914,7 @@ err:
        return ret;
 }
 
-static int m88ds3103_remove(struct i2c_client *client)
+static void m88ds3103_remove(struct i2c_client *client)
 {
        struct m88ds3103_dev *dev = i2c_get_clientdata(client);
 
@@ -1926,7 +1926,6 @@ static int m88ds3103_remove(struct i2c_client *client)
        i2c_mux_del_adapters(dev->muxc);
 
        kfree(dev);
-       return 0;
 }
 
 static const struct i2c_device_id m88ds3103_id_table[] = {
index fff212c..452571b 100644 (file)
@@ -762,15 +762,13 @@ err_i2c_t:
        return ret;
 }
 
-static int mn88443x_remove(struct i2c_client *client)
+static void mn88443x_remove(struct i2c_client *client)
 {
        struct mn88443x_priv *chip = i2c_get_clientdata(client);
 
        mn88443x_cmn_power_off(chip);
 
        i2c_unregister_device(chip->client_t);
-
-       return 0;
 }
 
 static const struct mn88443x_spec mn88443x_spec_pri = {
index 73922fc..2b01cc6 100644 (file)
@@ -691,7 +691,7 @@ err:
        return ret;
 }
 
-static int mn88472_remove(struct i2c_client *client)
+static void mn88472_remove(struct i2c_client *client)
 {
        struct mn88472_dev *dev = i2c_get_clientdata(client);
 
@@ -706,8 +706,6 @@ static int mn88472_remove(struct i2c_client *client)
        regmap_exit(dev->regmap[0]);
 
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id mn88472_id_table[] = {
index 4838969..f0ecf59 100644 (file)
@@ -726,7 +726,7 @@ err:
        return ret;
 }
 
-static int mn88473_remove(struct i2c_client *client)
+static void mn88473_remove(struct i2c_client *client)
 {
        struct mn88473_dev *dev = i2c_get_clientdata(client);
 
@@ -741,8 +741,6 @@ static int mn88473_remove(struct i2c_client *client)
        regmap_exit(dev->regmap[0]);
 
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id mn88473_id_table[] = {
index dd7954e..129630c 100644 (file)
@@ -1337,15 +1337,13 @@ err:
        return -ENODEV;
 }
 
-static int mxl692_remove(struct i2c_client *client)
+static void mxl692_remove(struct i2c_client *client)
 {
        struct mxl692_dev *dev = i2c_get_clientdata(client);
 
        dev->fe.demodulator_priv = NULL;
        i2c_set_clientdata(client, NULL);
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id mxl692_id_table[] = {
index e6b8367..e0fbf41 100644 (file)
@@ -865,7 +865,7 @@ err:
        return ret;
 }
 
-static int rtl2830_remove(struct i2c_client *client)
+static void rtl2830_remove(struct i2c_client *client)
 {
        struct rtl2830_dev *dev = i2c_get_clientdata(client);
 
@@ -874,8 +874,6 @@ static int rtl2830_remove(struct i2c_client *client)
        i2c_mux_del_adapters(dev->muxc);
        regmap_exit(dev->regmap);
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id rtl2830_id_table[] = {
index dcbeb9f..4fa884e 100644 (file)
@@ -1110,7 +1110,7 @@ err:
        return ret;
 }
 
-static int rtl2832_remove(struct i2c_client *client)
+static void rtl2832_remove(struct i2c_client *client)
 {
        struct rtl2832_dev *dev = i2c_get_clientdata(client);
 
@@ -1123,8 +1123,6 @@ static int rtl2832_remove(struct i2c_client *client)
        regmap_exit(dev->regmap);
 
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id rtl2832_id_table[] = {
index ebee230..86b0d59 100644 (file)
@@ -1274,14 +1274,13 @@ error:
        return ret;
 }
 
-static int si2165_remove(struct i2c_client *client)
+static void si2165_remove(struct i2c_client *client)
 {
        struct si2165_state *state = i2c_get_clientdata(client);
 
        dev_dbg(&client->dev, "\n");
 
        kfree(state);
-       return 0;
 }
 
 static const struct i2c_device_id si2165_id_table[] = {
index 196e028..8157df4 100644 (file)
@@ -774,7 +774,7 @@ err:
        return ret;
 }
 
-static int si2168_remove(struct i2c_client *client)
+static void si2168_remove(struct i2c_client *client)
 {
        struct si2168_dev *dev = i2c_get_clientdata(client);
 
@@ -786,8 +786,6 @@ static int si2168_remove(struct i2c_client *client)
        dev->fe.demodulator_priv = NULL;
 
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id si2168_id_table[] = {
index 992f221..27e7037 100644 (file)
@@ -398,14 +398,13 @@ err:
        return ret;
 }
 
-static int sp2_remove(struct i2c_client *client)
+static void sp2_remove(struct i2c_client *client)
 {
        struct sp2 *s = i2c_get_clientdata(client);
 
        dev_dbg(&client->dev, "\n");
        sp2_exit(client);
        kfree(s);
-       return 0;
 }
 
 static const struct i2c_device_id sp2_id[] = {
index 90d2413..0a600c1 100644 (file)
@@ -5032,12 +5032,11 @@ error:
        return ret;
 }
 
-static int stv090x_remove(struct i2c_client *client)
+static void stv090x_remove(struct i2c_client *client)
 {
        struct stv090x_state *state = i2c_get_clientdata(client);
 
        stv090x_release(&state->frontend);
-       return 0;
 }
 
 struct dvb_frontend *stv090x_attach(struct stv090x_config *config,
index 5012d02..fbc4dbd 100644 (file)
@@ -436,12 +436,11 @@ static int stv6110x_probe(struct i2c_client *client,
        return 0;
 }
 
-static int stv6110x_remove(struct i2c_client *client)
+static void stv6110x_remove(struct i2c_client *client)
 {
        struct stv6110x_state *stv6110x = i2c_get_clientdata(client);
 
        stv6110x_release(stv6110x->frontend);
-       return 0;
 }
 
 const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
index e83836b..c22d2a2 100644 (file)
@@ -819,14 +819,13 @@ free_state:
        return ret;
 }
 
-static int tc90522_remove(struct i2c_client *client)
+static void tc90522_remove(struct i2c_client *client)
 {
        struct tc90522_state *state;
 
        state = cfg_to_state(i2c_get_clientdata(client));
        i2c_del_adapter(&state->tuner_i2c);
        kfree(state);
-       return 0;
 }
 
 
index 685c0ac..d1098ef 100644 (file)
@@ -1221,14 +1221,13 @@ err:
        return ret;
 }
 
-static int tda10071_remove(struct i2c_client *client)
+static void tda10071_remove(struct i2c_client *client)
 {
        struct tda10071_dev *dev = i2c_get_clientdata(client);
 
        dev_dbg(&client->dev, "\n");
 
        kfree(dev);
-       return 0;
 }
 
 static const struct i2c_device_id tda10071_id_table[] = {
index 3e38391..0233825 100644 (file)
@@ -696,7 +696,7 @@ err:
        return ret;
 }
 
-static int ts2020_remove(struct i2c_client *client)
+static void ts2020_remove(struct i2c_client *client)
 {
        struct ts2020_priv *dev = i2c_get_clientdata(client);
 
@@ -708,7 +708,6 @@ static int ts2020_remove(struct i2c_client *client)
 
        regmap_exit(dev->regmap);
        kfree(dev);
-       return 0;
 }
 
 static const struct i2c_device_id ts2020_id_table[] = {
index 2958a46..516de27 100644 (file)
@@ -342,7 +342,7 @@ cleanup:
        return ret;
 }
 
-static int ad5820_remove(struct i2c_client *client)
+static void ad5820_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct ad5820_device *coil = to_ad5820_device(subdev);
@@ -351,7 +351,6 @@ static int ad5820_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(&coil->ctrls);
        media_entity_cleanup(&coil->subdev.entity);
        mutex_destroy(&coil->power_lock);
-       return 0;
 }
 
 static const struct i2c_device_id ad5820_id_table[] = {
index 8679a44..4a255a4 100644 (file)
@@ -1174,7 +1174,7 @@ err_hdl:
 
 /* ----------------------------------------------------------------------- */
 
-static int ad9389b_remove(struct i2c_client *client)
+static void ad9389b_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ad9389b_state *state = get_ad9389b_state(sd);
@@ -1192,7 +1192,6 @@ static int ad9389b_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(sd);
        media_entity_cleanup(&sd->entity);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 522a0b1..1f35315 100644 (file)
@@ -510,7 +510,7 @@ free_and_quit:
        return ret;
 }
 
-static int adp1653_remove(struct i2c_client *client)
+static void adp1653_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct adp1653_flash *flash = to_adp1653_flash(subdev);
@@ -518,8 +518,6 @@ static int adp1653_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(&flash->subdev);
        v4l2_ctrl_handler_free(&flash->ctrls);
        media_entity_cleanup(&flash->subdev.entity);
-
-       return 0;
 }
 
 static const struct i2c_device_id adp1653_id_table[] = {
index 714e31f..61a2f87 100644 (file)
@@ -368,12 +368,11 @@ static int adv7170_probe(struct i2c_client *client,
        return 0;
 }
 
-static int adv7170_remove(struct i2c_client *client)
+static void adv7170_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 1813f67..b586897 100644 (file)
@@ -423,12 +423,11 @@ static int adv7175_probe(struct i2c_client *client,
        return 0;
 }
 
-static int adv7175_remove(struct i2c_client *client)
+static void adv7175_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 5fde524..216fe39 100644 (file)
@@ -1514,7 +1514,7 @@ err_unregister_csi_client:
        return ret;
 }
 
-static int adv7180_remove(struct i2c_client *client)
+static void adv7180_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct adv7180_state *state = to_state(sd);
@@ -1534,8 +1534,6 @@ static int adv7180_remove(struct i2c_client *client)
        adv7180_set_power_pin(state, false);
 
        mutex_destroy(&state->mutex);
-
-       return 0;
 }
 
 static const struct i2c_device_id adv7180_id[] = {
index ba746a1..313c706 100644 (file)
@@ -613,13 +613,12 @@ static int adv7183_probe(struct i2c_client *client,
        return 0;
 }
 
-static int adv7183_remove(struct i2c_client *client)
+static void adv7183_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-       return 0;
 }
 
 static const struct i2c_device_id adv7183_id[] = {
index 63e94df..7e84869 100644 (file)
@@ -492,15 +492,13 @@ done:
        return err;
 }
 
-static int adv7343_remove(struct i2c_client *client)
+static void adv7343_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct adv7343_state *state = to_state(sd);
 
        v4l2_async_unregister_subdev(&state->sd);
        v4l2_ctrl_handler_free(&state->hdl);
-
-       return 0;
 }
 
 static const struct i2c_device_id adv7343_id[] = {
index b6234c8..fb5fefa 100644 (file)
@@ -437,15 +437,13 @@ static int adv7393_probe(struct i2c_client *client,
        return err;
 }
 
-static int adv7393_remove(struct i2c_client *client)
+static void adv7393_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct adv7393_state *state = to_state(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&state->hdl);
-
-       return 0;
 }
 
 static const struct i2c_device_id adv7393_id[] = {
index 4e54148..4498d78 100644 (file)
@@ -815,7 +815,7 @@ err_free_mutex:
        return ret;
 }
 
-static int adv748x_remove(struct i2c_client *client)
+static void adv748x_remove(struct i2c_client *client)
 {
        struct adv748x_state *state = i2c_get_clientdata(client);
 
@@ -828,8 +828,6 @@ static int adv748x_remove(struct i2c_client *client)
        adv748x_unregister_clients(state);
        adv748x_dt_cleanup(state);
        mutex_destroy(&state->mutex);
-
-       return 0;
 }
 
 static const struct of_device_id adv748x_of_table[] = {
index 202e0cd..49aca57 100644 (file)
@@ -1923,7 +1923,7 @@ err_hdl:
 
 /* ----------------------------------------------------------------------- */
 
-static int adv7511_remove(struct i2c_client *client)
+static void adv7511_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct adv7511_state *state = get_adv7511_state(sd);
@@ -1943,7 +1943,6 @@ static int adv7511_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(sd);
        media_entity_cleanup(&sd->entity);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 497419a..5988a4f 100644 (file)
@@ -3660,7 +3660,7 @@ err_hdl:
 
 /* ----------------------------------------------------------------------- */
 
-static int adv76xx_remove(struct i2c_client *client)
+static void adv76xx_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct adv76xx_state *state = to_state(sd);
@@ -3677,7 +3677,6 @@ static int adv76xx_remove(struct i2c_client *client)
        media_entity_cleanup(&sd->entity);
        adv76xx_unregister_clients(to_state(sd));
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 22caa07..a8dd929 100644 (file)
@@ -3593,7 +3593,7 @@ err_hdl:
 
 /* ----------------------------------------------------------------------- */
 
-static int adv7842_remove(struct i2c_client *client)
+static void adv7842_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct adv7842_state *state = to_state(sd);
@@ -3604,7 +3604,6 @@ static int adv7842_remove(struct i2c_client *client)
        media_entity_cleanup(&sd->entity);
        adv7842_unregister_clients(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 40b1a4a..1af9f69 100644 (file)
@@ -169,7 +169,7 @@ err_cleanup:
        return ret;
 }
 
-static int ak7375_remove(struct i2c_client *client)
+static void ak7375_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ak7375_device *ak7375_dev = sd_to_ak7375_vcm(sd);
@@ -177,8 +177,6 @@ static int ak7375_remove(struct i2c_client *client)
        ak7375_subdev_cleanup(ak7375_dev);
        pm_runtime_disable(&client->dev);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 /*
index dc569d5..0370ad6 100644 (file)
@@ -297,13 +297,11 @@ static int ak881x_probe(struct i2c_client *client,
        return 0;
 }
 
-static int ak881x_remove(struct i2c_client *client)
+static void ak881x_remove(struct i2c_client *client)
 {
        struct ak881x *ak881x = to_ak881x(client);
 
        v4l2_device_unregister_subdev(&ak881x->subdev);
-
-       return 0;
 }
 
 static const struct i2c_device_id ak881x_id[] = {
index c7bdfc6..c6ab531 100644 (file)
@@ -1018,7 +1018,7 @@ entity_cleanup:
        return ret;
 }
 
-static int ar0521_remove(struct i2c_client *client)
+static void ar0521_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ar0521_dev *sensor = to_ar0521_dev(sd);
@@ -1031,7 +1031,6 @@ static int ar0521_remove(struct i2c_client *client)
                ar0521_power_off(&client->dev);
        pm_runtime_set_suspended(&client->dev);
        mutex_destroy(&sensor->lock);
-       return 0;
 }
 
 static const struct dev_pm_ops ar0521_pm_ops = {
index 73bc50c..4d9bb6e 100644 (file)
@@ -446,14 +446,13 @@ static int bt819_probe(struct i2c_client *client,
        return 0;
 }
 
-static int bt819_remove(struct i2c_client *client)
+static void bt819_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct bt819 *decoder = to_bt819(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&decoder->hdl);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index c134fda..70443ef 100644 (file)
@@ -223,12 +223,11 @@ static int bt856_probe(struct i2c_client *client,
        return 0;
 }
 
-static int bt856_remove(struct i2c_client *client)
+static void bt856_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 static const struct i2c_device_id bt856_id[] = {
index 1a8df9f..c2508cb 100644 (file)
@@ -190,12 +190,11 @@ static int bt866_probe(struct i2c_client *client,
        return 0;
 }
 
-static int bt866_remove(struct i2c_client *client)
+static void bt866_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 static const struct i2c_device_id bt866_id[] = {
index 7609add..4a14d7e 100644 (file)
@@ -3665,7 +3665,7 @@ out_power_off:
        return rval;
 }
 
-static int ccs_remove(struct i2c_client *client)
+static void ccs_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct ccs_sensor *sensor = to_ccs_sensor(subdev);
@@ -3687,8 +3687,6 @@ static int ccs_remove(struct i2c_client *client)
        kfree(sensor->ccs_limits);
        kvfree(sensor->sdata.backing);
        kvfree(sensor->mdata.backing);
-
-       return 0;
 }
 
 static const struct ccs_device smia_device = {
index ebe55e2..d901a59 100644 (file)
@@ -99,13 +99,12 @@ static int cs3308_probe(struct i2c_client *client,
 
 /* ----------------------------------------------------------------------- */
 
-static int cs3308_remove(struct i2c_client *client)
+static void cs3308_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        kfree(sd);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index f6dd5ed..591b1e7 100644 (file)
@@ -178,14 +178,13 @@ static int cs5345_probe(struct i2c_client *client,
 
 /* ----------------------------------------------------------------------- */
 
-static int cs5345_remove(struct i2c_client *client)
+static void cs5345_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct cs5345_state *state = to_state(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&state->hdl);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 9a41110..9461589 100644 (file)
@@ -190,14 +190,13 @@ static int cs53l32a_probe(struct i2c_client *client,
        return 0;
 }
 
-static int cs53l32a_remove(struct i2c_client *client)
+static void cs53l32a_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct cs53l32a_state *state = to_state(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&state->hdl);
-       return 0;
 }
 
 static const struct i2c_device_id cs53l32a_id[] = {
index dc31944..f1a978a 100644 (file)
@@ -6026,7 +6026,7 @@ static int cx25840_probe(struct i2c_client *client,
        return 0;
 }
 
-static int cx25840_remove(struct i2c_client *client)
+static void cx25840_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct cx25840_state *state = to_state(sd);
@@ -6034,7 +6034,6 @@ static int cx25840_remove(struct i2c_client *client)
        cx25840_ir_remove(sd);
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&state->hdl);
-       return 0;
 }
 
 static const struct i2c_device_id cx25840_id[] = {
index 206d743..af59687 100644 (file)
@@ -190,7 +190,7 @@ err_cleanup:
        return rval;
 }
 
-static int dw9714_remove(struct i2c_client *client)
+static void dw9714_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct dw9714_device *dw9714_dev = sd_to_dw9714_vcm(sd);
@@ -206,8 +206,6 @@ static int dw9714_remove(struct i2c_client *client)
        }
        pm_runtime_set_suspended(&client->dev);
        dw9714_subdev_cleanup(dw9714_dev);
-
-       return 0;
 }
 
 /*
index c086580..0f47ef0 100644 (file)
@@ -499,7 +499,7 @@ err_free_handler:
        return ret;
 }
 
-static int dw9768_remove(struct i2c_client *client)
+static void dw9768_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct dw9768 *dw9768 = sd_to_dw9768(sd);
@@ -511,8 +511,6 @@ static int dw9768_remove(struct i2c_client *client)
        if (!pm_runtime_status_suspended(&client->dev))
                dw9768_runtime_suspend(&client->dev);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 static const struct of_device_id dw9768_of_table[] = {
index 01c3729..3599720 100644 (file)
@@ -216,7 +216,7 @@ err_cleanup:
        return rval;
 }
 
-static int dw9807_remove(struct i2c_client *client)
+static void dw9807_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct dw9807_device *dw9807_dev = sd_to_dw9807_vcm(sd);
@@ -224,8 +224,6 @@ static int dw9807_remove(struct i2c_client *client)
        pm_runtime_disable(&client->dev);
 
        dw9807_subdev_cleanup(dw9807_dev);
-
-       return 0;
 }
 
 /*
index 873d614..ff9bb9f 100644 (file)
@@ -1460,7 +1460,7 @@ err_mutex:
        return ret;
 }
 
-static int __exit et8ek8_remove(struct i2c_client *client)
+static void __exit et8ek8_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct et8ek8_sensor *sensor = to_et8ek8_sensor(subdev);
@@ -1477,8 +1477,6 @@ static int __exit et8ek8_remove(struct i2c_client *client)
        v4l2_async_unregister_subdev(&sensor->subdev);
        media_entity_cleanup(&sensor->subdev.entity);
        mutex_destroy(&sensor->power_lock);
-
-       return 0;
 }
 
 static const struct of_device_id et8ek8_of_table[] = {
index 055d1aa..e422ac7 100644 (file)
@@ -1101,7 +1101,7 @@ check_hwcfg_error:
        return ret;
 }
 
-static int hi556_remove(struct i2c_client *client)
+static void hi556_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct hi556 *hi556 = to_hi556(sd);
@@ -1111,8 +1111,6 @@ static int hi556_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        pm_runtime_disable(&client->dev);
        mutex_destroy(&hi556->mutex);
-
-       return 0;
 }
 
 static int hi556_probe(struct i2c_client *client)
index ad35c3f..c5b6982 100644 (file)
@@ -2143,7 +2143,7 @@ err_mutex:
        return ret;
 }
 
-static int hi846_remove(struct i2c_client *client)
+static void hi846_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct hi846 *hi846 = to_hi846(sd);
@@ -2158,8 +2158,6 @@ static int hi846_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        mutex_destroy(&hi846->mutex);
-
-       return 0;
 }
 
 static const struct dev_pm_ops hi846_pm_ops = {
index 7e85349..5a82b15 100644 (file)
@@ -2903,7 +2903,7 @@ check_hwcfg_error:
        return ret;
 }
 
-static int hi847_remove(struct i2c_client *client)
+static void hi847_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct hi847 *hi847 = to_hi847(sd);
@@ -2913,8 +2913,6 @@ static int hi847_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        pm_runtime_disable(&client->dev);
        mutex_destroy(&hi847->mutex);
-
-       return 0;
 }
 
 static int hi847_probe(struct i2c_client *client)
index b9516b2..a0e17bb 100644 (file)
@@ -1061,7 +1061,7 @@ error_probe:
        return ret;
 }
 
-static int imx208_remove(struct i2c_client *client)
+static void imx208_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx208 *imx208 = to_imx208(sd);
@@ -1075,8 +1075,6 @@ static int imx208_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        mutex_destroy(&imx208->imx208_mx);
-
-       return 0;
 }
 
 static const struct dev_pm_ops imx208_pm_ops = {
index 83c1737..710c9fb 100644 (file)
@@ -1080,7 +1080,7 @@ free_ctrl:
        return ret;
 }
 
-static int imx214_remove(struct i2c_client *client)
+static void imx214_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx214 *imx214 = to_imx214(sd);
@@ -1093,8 +1093,6 @@ static int imx214_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        mutex_destroy(&imx214->mutex);
-
-       return 0;
 }
 
 static const struct of_device_id imx214_of_match[] = {
index e10af3f..77bd79a 100644 (file)
@@ -1562,7 +1562,7 @@ error_power_off:
        return ret;
 }
 
-static int imx219_remove(struct i2c_client *client)
+static void imx219_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx219 *imx219 = to_imx219(sd);
@@ -1575,8 +1575,6 @@ static int imx219_remove(struct i2c_client *client)
        if (!pm_runtime_status_suspended(&client->dev))
                imx219_power_off(&client->dev);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 static const struct of_device_id imx219_dt_ids[] = {
index c249507..eab5fc1 100644 (file)
@@ -1338,7 +1338,7 @@ error_identify:
        return ret;
 }
 
-static int imx258_remove(struct i2c_client *client)
+static void imx258_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx258 *imx258 = to_imx258(sd);
@@ -1351,8 +1351,6 @@ static int imx258_remove(struct i2c_client *client)
        if (!pm_runtime_status_suspended(&client->dev))
                imx258_power_off(&client->dev);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 static const struct dev_pm_ops imx258_pm_ops = {
index 7de1f29..a00761b 100644 (file)
@@ -2142,7 +2142,7 @@ err_regmap:
        return ret;
 }
 
-static int imx274_remove(struct i2c_client *client)
+static void imx274_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct stimx274 *imx274 = to_imx274(sd);
@@ -2157,7 +2157,6 @@ static int imx274_remove(struct i2c_client *client)
 
        media_entity_cleanup(&sd->entity);
        mutex_destroy(&imx274->lock);
-       return 0;
 }
 
 static const struct dev_pm_ops imx274_pm_ops = {
index 99f2a50..1ce64dc 100644 (file)
@@ -1119,7 +1119,7 @@ free_err:
        return ret;
 }
 
-static int imx290_remove(struct i2c_client *client)
+static void imx290_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx290 *imx290 = to_imx290(sd);
@@ -1134,8 +1134,6 @@ static int imx290_remove(struct i2c_client *client)
        if (!pm_runtime_status_suspended(imx290->dev))
                imx290_power_off(imx290->dev);
        pm_runtime_set_suspended(imx290->dev);
-
-       return 0;
 }
 
 static const struct of_device_id imx290_of_match[] = {
index a2b5a34..245a18f 100644 (file)
@@ -2523,7 +2523,7 @@ error_probe:
        return ret;
 }
 
-static int imx319_remove(struct i2c_client *client)
+static void imx319_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx319 *imx319 = to_imx319(sd);
@@ -2536,8 +2536,6 @@ static int imx319_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        mutex_destroy(&imx319->mutex);
-
-       return 0;
 }
 
 static const struct dev_pm_ops imx319_pm_ops = {
index 0621255..7b0a908 100644 (file)
@@ -1089,7 +1089,7 @@ error_mutex_destroy:
  *
  * Return: 0 if successful, error code otherwise.
  */
-static int imx334_remove(struct i2c_client *client)
+static void imx334_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx334 *imx334 = to_imx334(sd);
@@ -1102,8 +1102,6 @@ static int imx334_remove(struct i2c_client *client)
        pm_runtime_suspended(&client->dev);
 
        mutex_destroy(&imx334->mutex);
-
-       return 0;
 }
 
 static const struct dev_pm_ops imx334_pm_ops = {
index 410d6b8..078ede2 100644 (file)
@@ -1083,7 +1083,7 @@ error_mutex_destroy:
  *
  * Return: 0 if successful, error code otherwise.
  */
-static int imx335_remove(struct i2c_client *client)
+static void imx335_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx335 *imx335 = to_imx335(sd);
@@ -1098,8 +1098,6 @@ static int imx335_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        mutex_destroy(&imx335->mutex);
-
-       return 0;
 }
 
 static const struct dev_pm_ops imx335_pm_ops = {
index 3922b93..b461786 100644 (file)
@@ -1810,7 +1810,7 @@ error_probe:
        return ret;
 }
 
-static int imx355_remove(struct i2c_client *client)
+static void imx355_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx355 *imx355 = to_imx355(sd);
@@ -1823,8 +1823,6 @@ static int imx355_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        mutex_destroy(&imx355->mutex);
-
-       return 0;
 }
 
 static const struct dev_pm_ops imx355_pm_ops = {
index a1394d6..7f6d29e 100644 (file)
@@ -1257,7 +1257,7 @@ error_mutex_destroy:
  *
  * Return: 0 if successful, error code otherwise.
  */
-static int imx412_remove(struct i2c_client *client)
+static void imx412_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct imx412 *imx412 = to_imx412(sd);
@@ -1272,8 +1272,6 @@ static int imx412_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        mutex_destroy(&imx412->mutex);
-
-       return 0;
 }
 
 static const struct dev_pm_ops imx412_pm_ops = {
index 5667417..ee6bbbb 100644 (file)
@@ -915,7 +915,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return err;
 }
 
-static int ir_remove(struct i2c_client *client)
+static void ir_remove(struct i2c_client *client)
 {
        struct IR_i2c *ir = i2c_get_clientdata(client);
 
@@ -924,8 +924,6 @@ static int ir_remove(struct i2c_client *client)
        i2c_unregister_device(ir->tx_c);
 
        rc_unregister_device(ir->rc);
-
-       return 0;
 }
 
 static const struct i2c_device_id ir_kbd_id[] = {
index dc30685..246d8d1 100644 (file)
@@ -1544,7 +1544,7 @@ err_entity_cleanup:
        return ret;
 }
 
-static int isl7998x_remove(struct i2c_client *client)
+static void isl7998x_remove(struct i2c_client *client)
 {
        struct isl7998x *isl7998x = i2c_to_isl7998x(client);
 
@@ -1552,8 +1552,6 @@ static int isl7998x_remove(struct i2c_client *client)
        v4l2_async_unregister_subdev(&isl7998x->subdev);
        isl7998x_remove_controls(isl7998x);
        media_entity_cleanup(&isl7998x->subdev.entity);
-
-       return 0;
 }
 
 static const struct of_device_id isl7998x_of_match[] = {
index c077f53..215d9a4 100644 (file)
@@ -675,14 +675,13 @@ static int ks0127_probe(struct i2c_client *client, const struct i2c_device_id *i
        return 0;
 }
 
-static int ks0127_remove(struct i2c_client *client)
+static void ks0127_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        ks0127_write(sd, KS_OFMTA, 0x20); /* tristate */
        ks0127_write(sd, KS_CMDA, 0x2c | 0x80); /* power down */
-       return 0;
 }
 
 static const struct i2c_device_id ks0127_id[] = {
index 9e34ccc..edad313 100644 (file)
@@ -443,7 +443,7 @@ static int lm3560_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lm3560_remove(struct i2c_client *client)
+static void lm3560_remove(struct i2c_client *client)
 {
        struct lm3560_flash *flash = i2c_get_clientdata(client);
        unsigned int i;
@@ -453,8 +453,6 @@ static int lm3560_remove(struct i2c_client *client)
                v4l2_ctrl_handler_free(&flash->ctrls_led[i]);
                media_entity_cleanup(&flash->subdev_led[i].entity);
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id lm3560_id_table[] = {
index c76ccf6..0aaa963 100644 (file)
@@ -377,15 +377,13 @@ static int lm3646_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lm3646_remove(struct i2c_client *client)
+static void lm3646_remove(struct i2c_client *client)
 {
        struct lm3646_flash *flash = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(&flash->subdev_led);
        v4l2_ctrl_handler_free(&flash->ctrls_led);
        media_entity_cleanup(&flash->subdev_led.entity);
-
-       return 0;
 }
 
 static const struct i2c_device_id lm3646_id_table[] = {
index 0a1efc1..2ab91b9 100644 (file)
@@ -154,12 +154,11 @@ static int m52790_probe(struct i2c_client *client,
        return 0;
 }
 
-static int m52790_remove(struct i2c_client *client)
+static void m52790_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index c195903..2201d2a 100644 (file)
@@ -1020,15 +1020,13 @@ error:
        return ret;
 }
 
-static int m5mols_remove(struct i2c_client *client)
+static void m5mols_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        media_entity_cleanup(&sd->entity);
-
-       return 0;
 }
 
 static const struct i2c_device_id m5mols_id[] = {
index 0eea200..1019020 100644 (file)
@@ -1403,15 +1403,13 @@ err_reg:
        return ret;
 }
 
-static int max2175_remove(struct i2c_client *client)
+static void max2175_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct max2175 *ctx = max2175_from_sd(sd);
 
        v4l2_ctrl_handler_free(&ctx->ctrl_hdl);
        v4l2_async_unregister_subdev(sd);
-
-       return 0;
 }
 
 static const struct i2c_device_id max2175_id[] = {
index 3684faa..9c083cf 100644 (file)
@@ -1378,7 +1378,7 @@ err_powerdown:
        return ret;
 }
 
-static int max9286_remove(struct i2c_client *client)
+static void max9286_remove(struct i2c_client *client)
 {
        struct max9286_priv *priv = sd_to_max9286(i2c_get_clientdata(client));
 
@@ -1391,8 +1391,6 @@ static int max9286_remove(struct i2c_client *client)
        gpiod_set_value_cansleep(priv->gpiod_pwdn, 0);
 
        max9286_cleanup_dt(priv);
-
-       return 0;
 }
 
 static const struct of_device_id max9286_dt_ids[] = {
index 48cc0b0..49ec59b 100644 (file)
@@ -415,15 +415,13 @@ cleanup:
        return ret;
 }
 
-static int ml86v7667_remove(struct i2c_client *client)
+static void ml86v7667_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ml86v7667_priv *priv = to_ml86v7667(sd);
 
        v4l2_ctrl_handler_free(&priv->hdl);
        v4l2_device_unregister_subdev(&priv->sd);
-
-       return 0;
 }
 
 static const struct i2c_device_id ml86v7667_id[] = {
index 39530d4..4ce7a15 100644 (file)
@@ -859,7 +859,7 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return 0;
 }
 
-static int msp_remove(struct i2c_client *client)
+static void msp_remove(struct i2c_client *client)
 {
        struct msp_state *state = to_state(i2c_get_clientdata(client));
 
@@ -872,7 +872,6 @@ static int msp_remove(struct i2c_client *client)
        msp_reset(client);
 
        v4l2_ctrl_handler_free(&state->hdl);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index ad13b0c..ebf9cf1 100644 (file)
@@ -833,7 +833,7 @@ error_hdl_free:
        return ret;
 }
 
-static int mt9m001_remove(struct i2c_client *client)
+static void mt9m001_remove(struct i2c_client *client)
 {
        struct mt9m001 *mt9m001 = to_mt9m001(client);
 
@@ -853,8 +853,6 @@ static int mt9m001_remove(struct i2c_client *client)
 
        v4l2_ctrl_handler_free(&mt9m001->hdl);
        mutex_destroy(&mt9m001->mutex);
-
-       return 0;
 }
 
 static const struct i2c_device_id mt9m001_id[] = {
index ba0c0ea..76b8c9c 100644 (file)
@@ -858,7 +858,7 @@ error_sensor:
        return ret;
 }
 
-static int mt9m032_remove(struct i2c_client *client)
+static void mt9m032_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct mt9m032 *sensor = to_mt9m032(subdev);
@@ -867,7 +867,6 @@ static int mt9m032_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(&sensor->ctrls);
        media_entity_cleanup(&subdev->entity);
        mutex_destroy(&sensor->lock);
-       return 0;
 }
 
 static const struct i2c_device_id mt9m032_id_table[] = {
index afc86ef..f5fe272 100644 (file)
@@ -1359,15 +1359,13 @@ out_hdlfree:
        return ret;
 }
 
-static int mt9m111_remove(struct i2c_client *client)
+static void mt9m111_remove(struct i2c_client *client)
 {
        struct mt9m111 *mt9m111 = to_mt9m111(client);
 
        v4l2_async_unregister_subdev(&mt9m111->subdev);
        media_entity_cleanup(&mt9m111->subdev.entity);
        v4l2_ctrl_handler_free(&mt9m111->hdl);
-
-       return 0;
 }
 static const struct of_device_id mt9m111_of_match[] = {
        { .compatible = "micron,mt9m111", },
index 1fd4dc6..45f7b5e 100644 (file)
@@ -1209,7 +1209,7 @@ done:
        return ret;
 }
 
-static int mt9p031_remove(struct i2c_client *client)
+static void mt9p031_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct mt9p031 *mt9p031 = to_mt9p031(subdev);
@@ -1218,8 +1218,6 @@ static int mt9p031_remove(struct i2c_client *client)
        v4l2_async_unregister_subdev(subdev);
        media_entity_cleanup(&subdev->entity);
        mutex_destroy(&mt9p031->power_lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id mt9p031_id[] = {
index b651ee4..d5abe4a 100644 (file)
@@ -961,7 +961,7 @@ done:
        return ret;
 }
 
-static int mt9t001_remove(struct i2c_client *client)
+static void mt9t001_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct mt9t001 *mt9t001 = to_mt9t001(subdev);
@@ -969,7 +969,6 @@ static int mt9t001_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(&mt9t001->ctrls);
        v4l2_device_unregister_subdev(subdev);
        media_entity_cleanup(&subdev->entity);
-       return 0;
 }
 
 static const struct i2c_device_id mt9t001_id[] = {
index 8d2e3ca..ad56409 100644 (file)
@@ -1102,14 +1102,12 @@ static int mt9t112_probe(struct i2c_client *client,
        return v4l2_async_register_subdev(&priv->subdev);
 }
 
-static int mt9t112_remove(struct i2c_client *client)
+static void mt9t112_remove(struct i2c_client *client)
 {
        struct mt9t112_priv *priv = to_mt9t112(client);
 
        clk_disable_unprepare(priv->clk);
        v4l2_async_unregister_subdev(&priv->subdev);
-
-       return 0;
 }
 
 static const struct i2c_device_id mt9t112_id[] = {
index 7699e64..9952ce0 100644 (file)
@@ -561,7 +561,7 @@ static int mt9v011_probe(struct i2c_client *c,
        return 0;
 }
 
-static int mt9v011_remove(struct i2c_client *c)
+static void mt9v011_remove(struct i2c_client *c)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(c);
        struct mt9v011 *core = to_mt9v011(sd);
@@ -572,8 +572,6 @@ static int mt9v011_remove(struct i2c_client *c)
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&core->ctrls);
-
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 4cfdd3d..bc4388c 100644 (file)
@@ -1192,7 +1192,7 @@ err:
        return ret;
 }
 
-static int mt9v032_remove(struct i2c_client *client)
+static void mt9v032_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct mt9v032 *mt9v032 = to_mt9v032(subdev);
@@ -1200,8 +1200,6 @@ static int mt9v032_remove(struct i2c_client *client)
        v4l2_async_unregister_subdev(subdev);
        v4l2_ctrl_handler_free(&mt9v032->ctrls);
        media_entity_cleanup(&subdev->entity);
-
-       return 0;
 }
 
 static const struct mt9v032_model_data mt9v032_model_data[] = {
index 2dc4a0f..fe18e52 100644 (file)
@@ -1238,7 +1238,7 @@ error_free_ctrls:
        return ret;
 }
 
-static int mt9v111_remove(struct i2c_client *client)
+static void mt9v111_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct mt9v111_dev *mt9v111 = sd_to_mt9v111(sd);
@@ -1253,8 +1253,6 @@ static int mt9v111_remove(struct i2c_client *client)
 
        mutex_destroy(&mt9v111->pwr_mutex);
        mutex_destroy(&mt9v111->stream_mutex);
-
-       return 0;
 }
 
 static const struct of_device_id mt9v111_of_match[] = {
index bc5187f..ecaf5e9 100644 (file)
@@ -789,7 +789,7 @@ np_err:
        return ret;
 }
 
-static int noon010_remove(struct i2c_client *client)
+static void noon010_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct noon010_info *info = to_noon010(sd);
@@ -797,8 +797,6 @@ static int noon010_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&info->hdl);
        media_entity_cleanup(&sd->entity);
-
-       return 0;
 }
 
 static const struct i2c_device_id noon010_id[] = {
index 87179fc..35663c1 100644 (file)
@@ -1015,7 +1015,7 @@ check_hwcfg_error:
        return ret;
 }
 
-static int og01a1b_remove(struct i2c_client *client)
+static void og01a1b_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct og01a1b *og01a1b = to_og01a1b(sd);
@@ -1025,8 +1025,6 @@ static int og01a1b_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        pm_runtime_disable(&client->dev);
        mutex_destroy(&og01a1b->mutex);
-
-       return 0;
 }
 
 static int og01a1b_probe(struct i2c_client *client)
index 0f08c05..2c1eb72 100644 (file)
@@ -975,7 +975,7 @@ err_destroy_mutex:
        return ret;
 }
 
-static int ov02a10_remove(struct i2c_client *client)
+static void ov02a10_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov02a10 *ov02a10 = to_ov02a10(sd);
@@ -988,8 +988,6 @@ static int ov02a10_remove(struct i2c_client *client)
                ov02a10_power_off(&client->dev);
        pm_runtime_set_suspended(&client->dev);
        mutex_destroy(&ov02a10->mutex);
-
-       return 0;
 }
 
 static const struct of_device_id ov02a10_of_match[] = {
index e5ef646..c170359 100644 (file)
@@ -1415,7 +1415,7 @@ check_hwcfg_error:
        return ret;
 }
 
-static int ov08d10_remove(struct i2c_client *client)
+static void ov08d10_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov08d10 *ov08d10 = to_ov08d10(sd);
@@ -1425,8 +1425,6 @@ static int ov08d10_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        pm_runtime_disable(&client->dev);
        mutex_destroy(&ov08d10->mutex);
-
-       return 0;
 }
 
 static int ov08d10_probe(struct i2c_client *client)
index d5fe67c..e618b61 100644 (file)
@@ -1769,7 +1769,7 @@ error_handler_free:
        return ret;
 }
 
-static int ov13858_remove(struct i2c_client *client)
+static void ov13858_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov13858 *ov13858 = to_ov13858(sd);
@@ -1779,8 +1779,6 @@ static int ov13858_remove(struct i2c_client *client)
        ov13858_free_controls(ov13858);
 
        pm_runtime_disable(&client->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id ov13858_id_table[] = {
index 7caeae6..549e5d9 100644 (file)
@@ -1447,7 +1447,7 @@ error_handler_free:
        return ret;
 }
 
-static int ov13b10_remove(struct i2c_client *client)
+static void ov13b10_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov13b10 *ov13b = to_ov13b10(sd);
@@ -1457,8 +1457,6 @@ static int ov13b10_remove(struct i2c_client *client)
        ov13b10_free_controls(ov13b);
 
        pm_runtime_disable(&client->dev);
-
-       return 0;
 }
 
 static const struct dev_pm_ops ov13b10_pm_ops = {
index 4b75da5..29ed0ef 100644 (file)
@@ -1271,7 +1271,7 @@ err_clk:
        return ret;
 }
 
-static int ov2640_remove(struct i2c_client *client)
+static void ov2640_remove(struct i2c_client *client)
 {
        struct ov2640_priv       *priv = to_ov2640(client);
 
@@ -1281,7 +1281,6 @@ static int ov2640_remove(struct i2c_client *client)
        media_entity_cleanup(&priv->subdev.entity);
        v4l2_device_unregister_subdev(&priv->subdev);
        clk_disable_unprepare(priv->clk);
-       return 0;
 }
 
 static const struct i2c_device_id ov2640_id[] = {
index 13ded5b..42fc64a 100644 (file)
@@ -1544,7 +1544,7 @@ error:
        return ret;
 }
 
-static int ov2659_remove(struct i2c_client *client)
+static void ov2659_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2659 *ov2659 = to_ov2659(sd);
@@ -1558,8 +1558,6 @@ static int ov2659_remove(struct i2c_client *client)
        if (!pm_runtime_status_suspended(&client->dev))
                ov2659_power_off(&client->dev);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 static const struct dev_pm_ops ov2659_pm_ops = {
index 906c711..de66d33 100644 (file)
@@ -1097,7 +1097,7 @@ lock_destroy:
        return ret;
 }
 
-static int ov2680_remove(struct i2c_client *client)
+static void ov2680_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2680_dev *sensor = to_ov2680_dev(sd);
@@ -1106,8 +1106,6 @@ static int ov2680_remove(struct i2c_client *client)
        mutex_destroy(&sensor->lock);
        media_entity_cleanup(&sensor->sd.entity);
        v4l2_ctrl_handler_free(&sensor->ctrls.handler);
-
-       return 0;
 }
 
 static int __maybe_unused ov2680_suspend(struct device *dev)
index b6e010e..a3b524f 100644 (file)
@@ -798,7 +798,7 @@ err_destroy_mutex:
        return ret;
 }
 
-static int ov2685_remove(struct i2c_client *client)
+static void ov2685_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2685 *ov2685 = to_ov2685(sd);
@@ -814,8 +814,6 @@ static int ov2685_remove(struct i2c_client *client)
        if (!pm_runtime_status_suspended(&client->dev))
                __ov2685_power_off(ov2685);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 #if IS_ENABLED(CONFIG_OF)
index d5f0eab..5d74ad4 100644 (file)
@@ -1053,7 +1053,7 @@ check_hwcfg_error:
        return ret;
 }
 
-static int ov2740_remove(struct i2c_client *client)
+static void ov2740_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2740 *ov2740 = to_ov2740(sd);
@@ -1063,8 +1063,6 @@ static int ov2740_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        pm_runtime_disable(&client->dev);
        mutex_destroy(&ov2740->mutex);
-
-       return 0;
 }
 
 static int ov2740_nvmem_read(void *priv, unsigned int off, void *val,
index 502f0b6..1852e1c 100644 (file)
@@ -3906,7 +3906,7 @@ entity_cleanup:
        return ret;
 }
 
-static int ov5640_remove(struct i2c_client *client)
+static void ov5640_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov5640_dev *sensor = to_ov5640_dev(sd);
@@ -3915,8 +3915,6 @@ static int ov5640_remove(struct i2c_client *client)
        media_entity_cleanup(&sensor->sd.entity);
        v4l2_ctrl_handler_free(&sensor->ctrls.handler);
        mutex_destroy(&sensor->lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id ov5640_id[] = {
index 562c62f..81e4e87 100644 (file)
@@ -1256,7 +1256,7 @@ free_ctrl:
        return ret;
 }
 
-static int ov5645_remove(struct i2c_client *client)
+static void ov5645_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov5645 *ov5645 = to_ov5645(sd);
@@ -1265,8 +1265,6 @@ static int ov5645_remove(struct i2c_client *client)
        media_entity_cleanup(&ov5645->sd.entity);
        v4l2_ctrl_handler_free(&ov5645->ctrls);
        mutex_destroy(&ov5645->power_lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id ov5645_id[] = {
index d346d18..847a7bb 100644 (file)
@@ -1448,7 +1448,7 @@ mutex_destroy:
        return ret;
 }
 
-static int ov5647_remove(struct i2c_client *client)
+static void ov5647_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov5647 *sensor = to_sensor(sd);
@@ -1459,8 +1459,6 @@ static int ov5647_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(sd);
        pm_runtime_disable(&client->dev);
        mutex_destroy(&sensor->lock);
-
-       return 0;
 }
 
 static const struct dev_pm_ops ov5647_pm_ops = {
index dfcd33e..84604ea 100644 (file)
@@ -2587,7 +2587,7 @@ error_endpoint:
        return ret;
 }
 
-static int ov5648_remove(struct i2c_client *client)
+static void ov5648_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct ov5648_sensor *sensor = ov5648_subdev_sensor(subdev);
@@ -2597,8 +2597,6 @@ static int ov5648_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(&sensor->ctrls.handler);
        mutex_destroy(&sensor->mutex);
        media_entity_cleanup(&subdev->entity);
-
-       return 0;
 }
 
 static const struct dev_pm_ops ov5648_pm_ops = {
index 02f75c1..bc9fc3b 100644 (file)
@@ -2557,7 +2557,7 @@ error_print:
        return ret;
 }
 
-static int ov5670_remove(struct i2c_client *client)
+static void ov5670_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov5670 *ov5670 = to_ov5670(sd);
@@ -2568,8 +2568,6 @@ static int ov5670_remove(struct i2c_client *client)
        mutex_destroy(&ov5670->mutex);
 
        pm_runtime_disable(&client->dev);
-
-       return 0;
 }
 
 static const struct dev_pm_ops ov5670_pm_ops = {
index 82ba9f5..94dc8cb 100644 (file)
@@ -1175,7 +1175,7 @@ check_hwcfg_error:
        return ret;
 }
 
-static int ov5675_remove(struct i2c_client *client)
+static void ov5675_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov5675 *ov5675 = to_ov5675(sd);
@@ -1185,8 +1185,6 @@ static int ov5675_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        pm_runtime_disable(&client->dev);
        mutex_destroy(&ov5675->mutex);
-
-       return 0;
 }
 
 static int ov5675_probe(struct i2c_client *client)
index 82a9b2d..a97ec13 100644 (file)
@@ -1501,7 +1501,7 @@ err_ctrl_handler_free:
        return ret;
 }
 
-static int ov5693_remove(struct i2c_client *client)
+static void ov5693_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov5693_device *ov5693 = to_ov5693_sensor(sd);
@@ -1519,8 +1519,6 @@ static int ov5693_remove(struct i2c_client *client)
        if (!pm_runtime_status_suspended(&client->dev))
                ov5693_sensor_powerdown(ov5693);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 static const struct dev_pm_ops ov5693_pm_ops = {
index 9103097..61906fc 100644 (file)
@@ -1361,7 +1361,7 @@ err_destroy_mutex:
        return ret;
 }
 
-static int ov5695_remove(struct i2c_client *client)
+static void ov5695_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov5695 *ov5695 = to_ov5695(sd);
@@ -1377,8 +1377,6 @@ static int ov5695_remove(struct i2c_client *client)
        if (!pm_runtime_status_suspended(&client->dev))
                __ov5695_power_off(ov5695);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 #if IS_ENABLED(CONFIG_OF)
index 6458e96..18f041e 100644 (file)
@@ -1096,13 +1096,12 @@ ectlhdlfree:
        return ret;
 }
 
-static int ov6650_remove(struct i2c_client *client)
+static void ov6650_remove(struct i2c_client *client)
 {
        struct ov6650 *priv = to_ov6650(client);
 
        v4l2_async_unregister_subdev(&priv->subdev);
        v4l2_ctrl_handler_free(&priv->hdl);
-       return 0;
 }
 
 static const struct i2c_device_id ov6650_id[] = {
index 1bd797c..88e9874 100644 (file)
@@ -1767,7 +1767,7 @@ destroy_mutex:
        return ret;
 }
 
-static int ov7251_remove(struct i2c_client *client)
+static void ov7251_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov7251 *ov7251 = to_ov7251(sd);
@@ -1781,8 +1781,6 @@ static int ov7251_remove(struct i2c_client *client)
        if (!pm_runtime_status_suspended(ov7251->dev))
                ov7251_set_power_off(ov7251->dev);
        pm_runtime_set_suspended(ov7251->dev);
-
-       return 0;
 }
 
 static const struct dev_pm_ops ov7251_pm_ops = {
index 977cd2d..5e2d67f 100644 (file)
@@ -70,13 +70,11 @@ static int ov7640_probe(struct i2c_client *client,
 }
 
 
-static int ov7640_remove(struct i2c_client *client)
+static void ov7640_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-
-       return 0;
 }
 
 static const struct i2c_device_id ov7640_id[] = {
index 1be2c0e..4b9b156 100644 (file)
@@ -2009,7 +2009,7 @@ power_off:
        return ret;
 }
 
-static int ov7670_remove(struct i2c_client *client)
+static void ov7670_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov7670_info *info = to_state(sd);
@@ -2017,7 +2017,6 @@ static int ov7670_remove(struct i2c_client *client)
        v4l2_async_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&info->hdl);
        media_entity_cleanup(&info->sd.entity);
-       return 0;
 }
 
 static const struct i2c_device_id ov7670_id[] = {
index 78602a2..4189e3f 100644 (file)
@@ -1521,7 +1521,7 @@ error_mutex_destroy:
        return ret;
 }
 
-static int ov772x_remove(struct i2c_client *client)
+static void ov772x_remove(struct i2c_client *client)
 {
        struct ov772x_priv *priv = to_ov772x(i2c_get_clientdata(client));
 
@@ -1532,8 +1532,6 @@ static int ov772x_remove(struct i2c_client *client)
        v4l2_async_unregister_subdev(&priv->subdev);
        v4l2_ctrl_handler_free(&priv->hdl);
        mutex_destroy(&priv->lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id ov772x_id[] = {
index 2539cfe..c9fd9b0 100644 (file)
@@ -1153,7 +1153,7 @@ error_detect:
        return ret;
 }
 
-static int ov7740_remove(struct i2c_client *client)
+static void ov7740_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov7740 *ov7740 = container_of(sd, struct ov7740, subdev);
@@ -1170,7 +1170,6 @@ static int ov7740_remove(struct i2c_client *client)
        pm_runtime_put_noidle(&client->dev);
 
        ov7740_set_power(ov7740, 0);
-       return 0;
 }
 
 static int __maybe_unused ov7740_runtime_suspend(struct device *dev)
index a9728af..efa18d0 100644 (file)
@@ -2440,7 +2440,7 @@ check_hwcfg_error:
        return ret;
 }
 
-static int ov8856_remove(struct i2c_client *client)
+static void ov8856_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov8856 *ov8856 = to_ov8856(sd);
@@ -2452,8 +2452,6 @@ static int ov8856_remove(struct i2c_client *client)
        mutex_destroy(&ov8856->mutex);
 
        __ov8856_power_off(ov8856);
-
-       return 0;
 }
 
 static int ov8856_probe(struct i2c_client *client)
index b8f4f0d..a233c34 100644 (file)
@@ -3119,7 +3119,7 @@ error_endpoint:
        return ret;
 }
 
-static int ov8865_remove(struct i2c_client *client)
+static void ov8865_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct ov8865_sensor *sensor = ov8865_subdev_sensor(subdev);
@@ -3131,8 +3131,6 @@ static int ov8865_remove(struct i2c_client *client)
        media_entity_cleanup(&subdev->entity);
 
        v4l2_fwnode_endpoint_free(&sensor->endpoint);
-
-       return 0;
 }
 
 static const struct dev_pm_ops ov8865_pm_ops = {
index 2e0b315..df144a2 100644 (file)
@@ -1091,7 +1091,7 @@ error_mutex_destroy:
  *
  * Return: 0 if successful, error code otherwise.
  */
-static int ov9282_remove(struct i2c_client *client)
+static void ov9282_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov9282 *ov9282 = to_ov9282(sd);
@@ -1106,8 +1106,6 @@ static int ov9282_remove(struct i2c_client *client)
        pm_runtime_set_suspended(&client->dev);
 
        mutex_destroy(&ov9282->mutex);
-
-       return 0;
 }
 
 static const struct dev_pm_ops ov9282_pm_ops = {
index 9f44ed5..8b80be3 100644 (file)
@@ -744,15 +744,13 @@ ectrlinit:
        return ret;
 }
 
-static int ov9640_remove(struct i2c_client *client)
+static void ov9640_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov9640_priv *priv = to_ov9640_sensor(sd);
 
        v4l2_async_unregister_subdev(&priv->subdev);
        v4l2_ctrl_handler_free(&priv->hdl);
-
-       return 0;
 }
 
 static const struct i2c_device_id ov9640_id[] = {
index c313e11..4d45899 100644 (file)
@@ -1584,7 +1584,7 @@ err_mutex:
        return ret;
 }
 
-static int ov965x_remove(struct i2c_client *client)
+static void ov965x_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov965x *ov965x = to_ov965x(sd);
@@ -1593,8 +1593,6 @@ static int ov965x_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        media_entity_cleanup(&sd->entity);
        mutex_destroy(&ov965x->lock);
-
-       return 0;
 }
 
 static const struct i2c_device_id ov965x_id[] = {
index df538ce..8b0a158 100644 (file)
@@ -930,7 +930,7 @@ check_hwcfg_error:
        return ret;
 }
 
-static int ov9734_remove(struct i2c_client *client)
+static void ov9734_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov9734 *ov9734 = to_ov9734(sd);
@@ -940,8 +940,6 @@ static int ov9734_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        pm_runtime_disable(&client->dev);
        mutex_destroy(&ov9734->mutex);
-
-       return 0;
 }
 
 static int ov9734_probe(struct i2c_client *client)
index 2615ad1..a2263fa 100644 (file)
@@ -646,7 +646,7 @@ error:
        return ret;
 }
 
-static int rdacm20_remove(struct i2c_client *client)
+static void rdacm20_remove(struct i2c_client *client)
 {
        struct rdacm20_device *dev = i2c_to_rdacm20(client);
 
@@ -655,8 +655,6 @@ static int rdacm20_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(&dev->ctrls);
        media_entity_cleanup(&dev->sd.entity);
        i2c_unregister_device(dev->sensor);
-
-       return 0;
 }
 
 static void rdacm20_shutdown(struct i2c_client *client)
index ef31cf5..9ccc56c 100644 (file)
@@ -614,7 +614,7 @@ error:
        return ret;
 }
 
-static int rdacm21_remove(struct i2c_client *client)
+static void rdacm21_remove(struct i2c_client *client)
 {
        struct rdacm21_device *dev = sd_to_rdacm21(i2c_get_clientdata(client));
 
@@ -622,8 +622,6 @@ static int rdacm21_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(&dev->ctrls);
        i2c_unregister_device(dev->isp);
        fwnode_handle_put(dev->sd.fwnode);
-
-       return 0;
 }
 
 static const struct of_device_id rdacm21_of_ids[] = {
index 2e4018c..1c3502f 100644 (file)
@@ -1398,7 +1398,7 @@ err_free_ctrl:
        return ret;
 }
 
-static int rj54n1_remove(struct i2c_client *client)
+static void rj54n1_remove(struct i2c_client *client)
 {
        struct rj54n1 *rj54n1 = to_rj54n1(client);
 
@@ -1410,8 +1410,6 @@ static int rj54n1_remove(struct i2c_client *client)
        clk_put(rj54n1->clk);
        v4l2_ctrl_handler_free(&rj54n1->hdl);
        v4l2_async_unregister_subdev(&rj54n1->subdev);
-
-       return 0;
 }
 
 static const struct i2c_device_id rj54n1_id[] = {
index e2b88c5..d96ba58 100644 (file)
@@ -1770,7 +1770,7 @@ out_err:
        return ret;
 }
 
-static int s5c73m3_remove(struct i2c_client *client)
+static void s5c73m3_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *oif_sd = i2c_get_clientdata(client);
        struct s5c73m3 *state = oif_sd_to_s5c73m3(oif_sd);
@@ -1785,8 +1785,6 @@ static int s5c73m3_remove(struct i2c_client *client)
        media_entity_cleanup(&sensor_sd->entity);
 
        s5c73m3_unregister_spi_driver(state);
-
-       return 0;
 }
 
 static const struct i2c_device_id s5c73m3_id[] = {
index af9a305..3dddcd9 100644 (file)
@@ -996,7 +996,7 @@ out_err1:
        return ret;
 }
 
-static int s5k4ecgx_remove(struct i2c_client *client)
+static void s5k4ecgx_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct s5k4ecgx *priv = to_s5k4ecgx(sd);
@@ -1006,8 +1006,6 @@ static int s5k4ecgx_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&priv->handler);
        media_entity_cleanup(&sd->entity);
-
-       return 0;
 }
 
 static const struct i2c_device_id s5k4ecgx_id[] = {
index 6a5dceb..5c2253a 100644 (file)
@@ -2018,7 +2018,7 @@ err_me:
        return ret;
 }
 
-static int s5k5baf_remove(struct i2c_client *c)
+static void s5k5baf_remove(struct i2c_client *c)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(c);
        struct s5k5baf *state = to_s5k5baf(sd);
@@ -2030,8 +2030,6 @@ static int s5k5baf_remove(struct i2c_client *c)
        sd = &state->cis_sd;
        v4l2_device_unregister_subdev(sd);
        media_entity_cleanup(&sd->entity);
-
-       return 0;
 }
 
 static const struct i2c_device_id s5k5baf_id[] = {
index f6ecf6f..a4efd6d 100644 (file)
@@ -354,14 +354,13 @@ static int s5k6a3_probe(struct i2c_client *client)
        return ret;
 }
 
-static int s5k6a3_remove(struct i2c_client *client)
+static void s5k6a3_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        pm_runtime_disable(&client->dev);
        v4l2_async_unregister_subdev(sd);
        media_entity_cleanup(&sd->entity);
-       return 0;
 }
 
 static const struct i2c_device_id s5k6a3_ids[] = {
index 105a4b7..0592117 100644 (file)
@@ -1621,15 +1621,13 @@ out_err:
        return ret;
 }
 
-static int s5k6aa_remove(struct i2c_client *client)
+static void s5k6aa_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        media_entity_cleanup(&sd->entity);
-
-       return 0;
 }
 
 static const struct i2c_device_id s5k6aa_id[] = {
index d1e0716..d6a51be 100644 (file)
@@ -484,7 +484,7 @@ static int saa6588_probe(struct i2c_client *client,
        return 0;
 }
 
-static int saa6588_remove(struct i2c_client *client)
+static void saa6588_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct saa6588 *s = to_saa6588(sd);
@@ -492,8 +492,6 @@ static int saa6588_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(sd);
 
        cancel_delayed_work_sync(&s->work);
-
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index a7f043c..5928cc6 100644 (file)
@@ -764,13 +764,12 @@ static int saa6752hs_probe(struct i2c_client *client,
        return 0;
 }
 
-static int saa6752hs_remove(struct i2c_client *client)
+static void saa6752hs_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&to_state(sd)->hdl);
-       return 0;
 }
 
 static const struct i2c_device_id saa6752hs_id[] = {
index 0c7a9ce..5067525 100644 (file)
@@ -428,14 +428,13 @@ static int saa7110_probe(struct i2c_client *client,
        return 0;
 }
 
-static int saa7110_remove(struct i2c_client *client)
+static void saa7110_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct saa7110 *decoder = to_saa7110(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&decoder->hdl);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 15ff80e..86e70a9 100644 (file)
@@ -1927,13 +1927,12 @@ static int saa711x_probe(struct i2c_client *client,
 
 /* ----------------------------------------------------------------------- */
 
-static int saa711x_remove(struct i2c_client *client)
+static void saa711x_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-       return 0;
 }
 
 static const struct i2c_device_id saa711x_id[] = {
index 891192f..78c9388 100644 (file)
@@ -785,14 +785,13 @@ static int saa7127_probe(struct i2c_client *client,
 
 /* ----------------------------------------------------------------------- */
 
-static int saa7127_remove(struct i2c_client *client)
+static void saa7127_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        /* Turn off TV output */
        saa7127_set_video_enable(sd, 0);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index adf9053..4f3d1b4 100644 (file)
@@ -1324,13 +1324,12 @@ static int saa717x_probe(struct i2c_client *client,
        return 0;
 }
 
-static int saa717x_remove(struct i2c_client *client)
+static void saa717x_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 7a04422..2664623 100644 (file)
@@ -322,7 +322,7 @@ static int saa7185_probe(struct i2c_client *client,
        return 0;
 }
 
-static int saa7185_remove(struct i2c_client *client)
+static void saa7185_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct saa7185 *encoder = to_saa7185(sd);
@@ -330,7 +330,6 @@ static int saa7185_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(sd);
        /* SW: output off is active */
        saa7185_write(sd, 0x61, (encoder->reg[0x61]) | 0x40);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index ad23928..927a9ec 100644 (file)
@@ -357,13 +357,11 @@ static int sony_btf_mpx_probe(struct i2c_client *client,
        return 0;
 }
 
-static int sony_btf_mpx_remove(struct i2c_client *client)
+static void sony_btf_mpx_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 19c0252..ff18693 100644 (file)
@@ -732,13 +732,12 @@ static int sr030pc30_probe(struct i2c_client *client,
        return 0;
 }
 
-static int sr030pc30_remove(struct i2c_client *client)
+static void sr030pc30_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-       return 0;
 }
 
 static const struct i2c_device_id sr030pc30_id[] = {
index 16cc547..31b89af 100644 (file)
@@ -1067,7 +1067,7 @@ mutex_cleanup:
        return ret;
 }
 
-static int mipid02_remove(struct i2c_client *client)
+static void mipid02_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct mipid02_dev *bridge = to_mipid02_dev(sd);
@@ -1078,8 +1078,6 @@ static int mipid02_remove(struct i2c_client *client)
        mipid02_set_power_off(bridge);
        media_entity_cleanup(&bridge->sd.entity);
        mutex_destroy(&bridge->lock);
-
-       return 0;
 }
 
 static const struct of_device_id mipid02_dt_ids[] = {
index e18b894..d99eedb 100644 (file)
@@ -2169,7 +2169,7 @@ err_hdl:
        return err;
 }
 
-static int tc358743_remove(struct i2c_client *client)
+static void tc358743_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct tc358743_state *state = to_state(sd);
@@ -2185,8 +2185,6 @@ static int tc358743_remove(struct i2c_client *client)
        mutex_destroy(&state->confctl_mutex);
        media_entity_cleanup(&sd->entity);
        v4l2_ctrl_handler_free(&state->hdl);
-
-       return 0;
 }
 
 static const struct i2c_device_id tc358743_id[] = {
index f66ac14..8393182 100644 (file)
@@ -2805,7 +2805,7 @@ err_free_state:
        return ret;
 }
 
-static int tda1997x_remove(struct i2c_client *client)
+static void tda1997x_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct tda1997x_state *state = to_state(sd);
@@ -2827,8 +2827,6 @@ static int tda1997x_remove(struct i2c_client *client)
        mutex_destroy(&state->lock);
 
        kfree(state);
-
-       return 0;
 }
 
 static struct i2c_driver tda1997x_i2c_driver = {
index cbdc9be..11e9183 100644 (file)
@@ -390,7 +390,7 @@ static int tda7432_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tda7432_remove(struct i2c_client *client)
+static void tda7432_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct tda7432 *t = to_state(sd);
@@ -398,7 +398,6 @@ static int tda7432_remove(struct i2c_client *client)
        tda7432_set(sd);
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&t->hdl);
-       return 0;
 }
 
 static const struct i2c_device_id tda7432_id[] = {
index 8c6dfe7..aaa7494 100644 (file)
@@ -175,12 +175,11 @@ static int tda9840_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tda9840_remove(struct i2c_client *client)
+static void tda9840_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 static const struct i2c_device_id tda9840_id[] = {
index 67378db..50e7431 100644 (file)
@@ -134,12 +134,11 @@ static int tea6415c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tea6415c_remove(struct i2c_client *client)
+static void tea6415c_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 static const struct i2c_device_id tea6415c_id[] = {
index 712141b..246f2b1 100644 (file)
@@ -116,12 +116,11 @@ static int tea6420_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tea6420_remove(struct i2c_client *client)
+static void tea6420_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 static const struct i2c_device_id tea6420_id[] = {
index 8206bf7..2a0f9a3 100644 (file)
@@ -358,13 +358,11 @@ static int ths7303_probe(struct i2c_client *client,
        return 0;
 }
 
-static int ths7303_remove(struct i2c_client *client)
+static void ths7303_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-
-       return 0;
 }
 
 static const struct i2c_device_id ths7303_id[] = {
index c52fe84..081ef5a 100644 (file)
@@ -468,7 +468,7 @@ static int ths8200_probe(struct i2c_client *client)
        return 0;
 }
 
-static int ths8200_remove(struct i2c_client *client)
+static void ths8200_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ths8200_state *decoder = to_state(sd);
@@ -478,8 +478,6 @@ static int ths8200_remove(struct i2c_client *client)
 
        ths8200_s_power(sd, false);
        v4l2_async_unregister_subdev(&decoder->sd);
-
-       return 0;
 }
 
 static const struct i2c_device_id ths8200_id[] = {
index e4c2199..937fa1d 100644 (file)
@@ -177,14 +177,13 @@ static int tlv320aic23b_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tlv320aic23b_remove(struct i2c_client *client)
+static void tlv320aic23b_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct tlv320aic23b_state *state = to_state(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&state->hdl);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index e6796e9..9f1ed07 100644 (file)
@@ -2065,7 +2065,7 @@ static int tvaudio_probe(struct i2c_client *client, const struct i2c_device_id *
        return 0;
 }
 
-static int tvaudio_remove(struct i2c_client *client)
+static void tvaudio_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct CHIPSTATE *chip = to_state(sd);
@@ -2079,7 +2079,6 @@ static int tvaudio_remove(struct i2c_client *client)
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&chip->hdl);
-       return 0;
 }
 
 /* This driver supports many devices and the idea is to let the driver
index cee60f9..a746d96 100644 (file)
@@ -1121,7 +1121,7 @@ done:
  * Unregister decoder as an i2c client device and V4L2
  * device. Complement of tvp514x_probe().
  */
-static int tvp514x_remove(struct i2c_client *client)
+static void tvp514x_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct tvp514x_decoder *decoder = to_decoder(sd);
@@ -1129,7 +1129,6 @@ static int tvp514x_remove(struct i2c_client *client)
        v4l2_async_unregister_subdev(&decoder->sd);
        media_entity_cleanup(&decoder->sd.entity);
        v4l2_ctrl_handler_free(&decoder->hdl);
-       return 0;
 }
 /* TVP5146 Init/Power on Sequence */
 static const struct tvp514x_reg tvp5146_init_reg_seq[] = {
index 93a980c..859f1cb 100644 (file)
@@ -2230,7 +2230,7 @@ err:
        return res;
 }
 
-static int tvp5150_remove(struct i2c_client *c)
+static void tvp5150_remove(struct i2c_client *c)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(c);
        struct tvp5150 *decoder = to_tvp5150(sd);
@@ -2250,8 +2250,6 @@ static int tvp5150_remove(struct i2c_client *c)
        v4l2_ctrl_handler_free(&decoder->hdl);
        pm_runtime_disable(&c->dev);
        pm_runtime_set_suspended(&c->dev);
-
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 2de1883..4ccd218 100644 (file)
@@ -1044,7 +1044,7 @@ error:
  * Reset the TVP7002 device
  * Returns zero.
  */
-static int tvp7002_remove(struct i2c_client *c)
+static void tvp7002_remove(struct i2c_client *c)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(c);
        struct tvp7002 *device = to_tvp7002(sd);
@@ -1056,7 +1056,6 @@ static int tvp7002_remove(struct i2c_client *c)
        media_entity_cleanup(&device->sd.entity);
 #endif
        v4l2_ctrl_handler_free(&device->hdl);
-       return 0;
 }
 
 /* I2C Device ID table */
index cd05f1f..c7c8dfe 100644 (file)
@@ -405,14 +405,13 @@ static int tw2804_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tw2804_remove(struct i2c_client *client)
+static void tw2804_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct tw2804 *state = to_state(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&state->hdl);
-       return 0;
 }
 
 static const struct i2c_device_id tw2804_id[] = {
index f8e3ab4..d7eef79 100644 (file)
@@ -235,13 +235,12 @@ static int tw9903_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tw9903_remove(struct i2c_client *client)
+static void tw9903_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&to_state(sd)->hdl);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index c528eb0..549ad8f 100644 (file)
@@ -203,13 +203,12 @@ static int tw9906_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tw9906_remove(struct i2c_client *client)
+static void tw9906_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&to_state(sd)->hdl);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 09f5b39..853b5ac 100644 (file)
@@ -993,7 +993,7 @@ error_clk_put:
        return ret;
 }
 
-static int tw9910_remove(struct i2c_client *client)
+static void tw9910_remove(struct i2c_client *client)
 {
        struct tw9910_priv *priv = to_tw9910(client);
 
@@ -1001,8 +1001,6 @@ static int tw9910_remove(struct i2c_client *client)
                gpiod_put(priv->pdn_gpio);
        clk_put(priv->clk);
        v4l2_async_unregister_subdev(&priv->subdev);
-
-       return 0;
 }
 
 static const struct i2c_device_id tw9910_id[] = {
index b0a9c6d..d0659c4 100644 (file)
@@ -72,12 +72,11 @@ static int uda1342_probe(struct i2c_client *client,
        return 0;
 }
 
-static int uda1342_remove(struct i2c_client *client)
+static void uda1342_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 static const struct i2c_device_id uda1342_id[] = {
index ef35c65..4de26ed 100644 (file)
@@ -210,12 +210,11 @@ static int upd64031a_probe(struct i2c_client *client,
        return 0;
 }
 
-static int upd64031a_remove(struct i2c_client *client)
+static void upd64031a_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index d6a1698..2bfd544 100644 (file)
@@ -181,12 +181,11 @@ static int upd64083_probe(struct i2c_client *client,
        return 0;
 }
 
-static int upd64083_remove(struct i2c_client *client)
+static void upd64083_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index e08e357..f15ef2d 100644 (file)
@@ -895,7 +895,7 @@ error_free_device:
        return ret;
 }
 
-static int video_i2c_remove(struct i2c_client *client)
+static void video_i2c_remove(struct i2c_client *client)
 {
        struct video_i2c_data *data = i2c_get_clientdata(client);
 
@@ -908,8 +908,6 @@ static int video_i2c_remove(struct i2c_client *client)
                data->chip->set_power(data, false);
 
        video_unregister_device(&data->vdev);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 492af87..c832eda 100644 (file)
@@ -163,12 +163,11 @@ static int vp27smpx_probe(struct i2c_client *client,
        return 0;
 }
 
-static int vp27smpx_remove(struct i2c_client *client)
+static void vp27smpx_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
-       return 0;
 }
 
 /* ----------------------------------------------------------------------- */
index 8be03fe..b481ec1 100644 (file)
@@ -526,15 +526,13 @@ static int vpx3220_probe(struct i2c_client *client,
        return 0;
 }
 
-static int vpx3220_remove(struct i2c_client *client)
+static void vpx3220_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct vpx3220 *decoder = to_vpx3220(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&decoder->hdl);
-
-       return 0;
 }
 
 static const struct i2c_device_id vpx3220_id[] = {
index 29003de..d496bb4 100644 (file)
@@ -824,13 +824,12 @@ static int vs6624_probe(struct i2c_client *client,
        return ret;
 }
 
-static int vs6624_remove(struct i2c_client *client)
+static void vs6624_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-       return 0;
 }
 
 static const struct i2c_device_id vs6624_id[] = {
index ed53383..180b353 100644 (file)
@@ -234,14 +234,13 @@ static int wm8739_probe(struct i2c_client *client,
        return 0;
 }
 
-static int wm8739_remove(struct i2c_client *client)
+static void wm8739_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct wm8739_state *state = to_state(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&state->hdl);
-       return 0;
 }
 
 static const struct i2c_device_id wm8739_id[] = {
index d4c83c3..8ff9786 100644 (file)
@@ -280,14 +280,13 @@ static int wm8775_probe(struct i2c_client *client,
        return 0;
 }
 
-static int wm8775_remove(struct i2c_client *client)
+static void wm8775_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct wm8775_state *state = to_state(sd);
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&state->hdl);
-       return 0;
 }
 
 static const struct i2c_device_id wm8775_id[] = {
index 877a24e..abda40e 100644 (file)
@@ -487,7 +487,7 @@ errfr:
        return ret;
 }
 
-static int tea5764_i2c_remove(struct i2c_client *client)
+static void tea5764_i2c_remove(struct i2c_client *client)
 {
        struct tea5764_device *radio = i2c_get_clientdata(client);
 
@@ -499,7 +499,6 @@ static int tea5764_i2c_remove(struct i2c_client *client)
                v4l2_device_unregister(&radio->v4l2_dev);
                kfree(radio);
        }
-       return 0;
 }
 
 /* I2C subsystem interface */
index adb66f8..f9e990a 100644 (file)
@@ -384,7 +384,7 @@ err:
        return err;
 }
 
-static int saa7706h_remove(struct i2c_client *client)
+static void saa7706h_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct saa7706h_state *state = to_state(sd);
@@ -393,7 +393,6 @@ static int saa7706h_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&state->hdl);
        kfree(to_state(sd));
-       return 0;
 }
 
 static const struct i2c_device_id saa7706h_id[] = {
index 59b3d77..a6ad926 100644 (file)
@@ -461,7 +461,7 @@ err_initial:
 /*
  * si470x_i2c_remove - remove the device
  */
-static int si470x_i2c_remove(struct i2c_client *client)
+static void si470x_i2c_remove(struct i2c_client *client)
 {
        struct si470x_device *radio = i2c_get_clientdata(client);
 
@@ -472,7 +472,6 @@ static int si470x_i2c_remove(struct i2c_client *client)
 
        v4l2_ctrl_handler_free(&radio->hdl);
        v4l2_device_unregister(&radio->v4l2_dev);
-       return 0;
 }
 
 
index adbf43f..2aec642 100644 (file)
@@ -1623,7 +1623,7 @@ exit:
 }
 
 /* si4713_remove - remove the device */
-static int si4713_remove(struct i2c_client *client)
+static void si4713_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct si4713_device *sdev = to_si4713_device(sd);
@@ -1635,8 +1635,6 @@ static int si4713_remove(struct i2c_client *client)
 
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
-
-       return 0;
 }
 
 /* si4713_i2c_driver - i2c driver interface */
index d881049..7b0870a 100644 (file)
@@ -165,13 +165,12 @@ static int tef6862_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tef6862_remove(struct i2c_client *client)
+static void tef6862_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
        v4l2_device_unregister_subdev(sd);
        kfree(to_state(sd));
-       return 0;
 }
 
 static const struct i2c_device_id tef6862_id[] = {
index b7823d9..e7959ab 100644 (file)
@@ -438,13 +438,11 @@ static int vidtv_demod_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int vidtv_demod_i2c_remove(struct i2c_client *client)
+static void vidtv_demod_i2c_remove(struct i2c_client *client)
 {
        struct vidtv_demod_state *state = i2c_get_clientdata(client);
 
        kfree(state);
-
-       return 0;
 }
 
 static struct i2c_driver vidtv_demod_i2c_driver = {
index 14b6bc9..aabc97e 100644 (file)
@@ -414,13 +414,11 @@ static int vidtv_tuner_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int vidtv_tuner_i2c_remove(struct i2c_client *client)
+static void vidtv_tuner_i2c_remove(struct i2c_client *client)
 {
        struct vidtv_tuner_dev *tuner_dev = i2c_get_clientdata(client);
 
        kfree(tuner_dev);
-
-       return 0;
 }
 
 static struct i2c_driver vidtv_tuner_i2c_driver = {
index a3a8d05..61ae884 100644 (file)
@@ -706,7 +706,7 @@ err:
        return ret;
 }
 
-static int e4000_remove(struct i2c_client *client)
+static void e4000_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct e4000_dev *dev = container_of(sd, struct e4000_dev, sd);
@@ -717,8 +717,6 @@ static int e4000_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(&dev->hdl);
 #endif
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id e4000_id_table[] = {
index 1b5961b..f30932e 100644 (file)
@@ -588,7 +588,7 @@ err:
        return ret;
 }
 
-static int fc2580_remove(struct i2c_client *client)
+static void fc2580_remove(struct i2c_client *client)
 {
        struct fc2580_dev *dev = i2c_get_clientdata(client);
 
@@ -598,7 +598,6 @@ static int fc2580_remove(struct i2c_client *client)
        v4l2_ctrl_handler_free(&dev->hdl);
 #endif
        kfree(dev);
-       return 0;
 }
 
 static const struct i2c_device_id fc2580_id_table[] = {
index 8647c50..e32e3e9 100644 (file)
@@ -697,7 +697,7 @@ err:
        return ret;
 }
 
-static int m88rs6000t_remove(struct i2c_client *client)
+static void m88rs6000t_remove(struct i2c_client *client)
 {
        struct m88rs6000t_dev *dev = i2c_get_clientdata(client);
        struct dvb_frontend *fe = dev->cfg.fe;
@@ -707,8 +707,6 @@ static int m88rs6000t_remove(struct i2c_client *client)
        memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
        fe->tuner_priv = NULL;
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id m88rs6000t_id[] = {
index 204e618..322c806 100644 (file)
@@ -509,11 +509,9 @@ err:
        return ret;
 }
 
-static int mt2060_remove(struct i2c_client *client)
+static void mt2060_remove(struct i2c_client *client)
 {
        dev_dbg(&client->dev, "\n");
-
-       return 0;
 }
 
 static const struct i2c_device_id mt2060_id_table[] = {
index c628435..6422056 100644 (file)
@@ -307,14 +307,13 @@ static int mxl301rf_probe(struct i2c_client *client,
        return 0;
 }
 
-static int mxl301rf_remove(struct i2c_client *client)
+static void mxl301rf_remove(struct i2c_client *client)
 {
        struct mxl301rf_state *state;
 
        state = cfg_to_state(i2c_get_clientdata(client));
        state->cfg.fe->tuner_priv = NULL;
        kfree(state);
-       return 0;
 }
 
 
index 008ad87..9cba089 100644 (file)
@@ -232,14 +232,13 @@ err_mem:
        return ret;
 }
 
-static int qm1d1b0004_remove(struct i2c_client *client)
+static void qm1d1b0004_remove(struct i2c_client *client)
 {
        struct dvb_frontend *fe;
 
        fe = i2c_get_clientdata(client);
        kfree(fe->tuner_priv);
        fe->tuner_priv = NULL;
-       return 0;
 }
 
 
index 53aa255..2d60bf5 100644 (file)
@@ -424,14 +424,13 @@ static int qm1d1c0042_probe(struct i2c_client *client,
        return 0;
 }
 
-static int qm1d1c0042_remove(struct i2c_client *client)
+static void qm1d1c0042_remove(struct i2c_client *client)
 {
        struct qm1d1c0042_state *state;
 
        state = cfg_to_state(i2c_get_clientdata(client));
        state->cfg.fe->tuner_priv = NULL;
        kfree(state);
-       return 0;
 }
 
 
index 0de587b..476b32c 100644 (file)
@@ -951,7 +951,7 @@ err:
        return ret;
 }
 
-static int si2157_remove(struct i2c_client *client)
+static void si2157_remove(struct i2c_client *client)
 {
        struct si2157_dev *dev = i2c_get_clientdata(client);
        struct dvb_frontend *fe = dev->fe;
@@ -969,8 +969,6 @@ static int si2157_remove(struct i2c_client *client)
        memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
        fe->tuner_priv = NULL;
        kfree(dev);
-
-       return 0;
 }
 
 /*
index bf48f1c..eb97711 100644 (file)
@@ -242,7 +242,7 @@ err:
        return ret;
 }
 
-static int tda18212_remove(struct i2c_client *client)
+static void tda18212_remove(struct i2c_client *client)
 {
        struct tda18212_dev *dev = i2c_get_clientdata(client);
        struct dvb_frontend *fe = dev->cfg.fe;
@@ -252,8 +252,6 @@ static int tda18212_remove(struct i2c_client *client)
        memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
        fe->tuner_priv = NULL;
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id tda18212_id[] = {
index 8a5781b..e404a5a 100644 (file)
@@ -856,7 +856,7 @@ err:
        return ret;
 }
 
-static int tda18250_remove(struct i2c_client *client)
+static void tda18250_remove(struct i2c_client *client)
 {
        struct tda18250_dev *dev = i2c_get_clientdata(client);
        struct dvb_frontend *fe = dev->fe;
@@ -866,8 +866,6 @@ static int tda18250_remove(struct i2c_client *client)
        memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
        fe->tuner_priv = NULL;
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id tda18250_id_table[] = {
index af7d5ea..d141d00 100644 (file)
@@ -227,7 +227,7 @@ err:
        return ret;
 }
 
-static int tua9001_remove(struct i2c_client *client)
+static void tua9001_remove(struct i2c_client *client)
 {
        struct tua9001_dev *dev = i2c_get_clientdata(client);
        struct dvb_frontend *fe = dev->fe;
@@ -243,7 +243,6 @@ static int tua9001_remove(struct i2c_client *client)
                        dev_err(&client->dev, "Tuner disable failed (%pe)\n", ERR_PTR(ret));
        }
        kfree(dev);
-       return 0;
 }
 
 static const struct i2c_device_id tua9001_id_table[] = {
index 1fa6f10..2f45188 100644 (file)
@@ -601,7 +601,7 @@ fail:
        return err;
 }
 
-static int s2250_remove(struct i2c_client *client)
+static void s2250_remove(struct i2c_client *client)
 {
        struct s2250 *state = to_state(i2c_get_clientdata(client));
 
@@ -609,7 +609,6 @@ static int s2250_remove(struct i2c_client *client)
        v4l2_device_unregister_subdev(&state->sd);
        v4l2_ctrl_handler_free(&state->hdl);
        kfree(state);
-       return 0;
 }
 
 static const struct i2c_device_id s2250_id[] = {
index 2d47c10..33162dc 100644 (file)
@@ -779,7 +779,7 @@ register_client:
  * @client:    i2c_client descriptor
  */
 
-static int tuner_remove(struct i2c_client *client)
+static void tuner_remove(struct i2c_client *client)
 {
        struct tuner *t = to_tuner(i2c_get_clientdata(client));
 
@@ -789,7 +789,6 @@ static int tuner_remove(struct i2c_client *client)
 
        list_del(&t->list);
        kfree(t);
-       return 0;
 }
 
 /*
index eaf9845..a30e47b 100644 (file)
@@ -583,7 +583,7 @@ out_init:
        return ret;
 }
 
-static int pm800_remove(struct i2c_client *client)
+static void pm800_remove(struct i2c_client *client)
 {
        struct pm80x_chip *chip = i2c_get_clientdata(client);
 
@@ -592,8 +592,6 @@ static int pm800_remove(struct i2c_client *client)
 
        pm800_pages_exit(chip);
        pm80x_deinit();
-
-       return 0;
 }
 
 static struct i2c_driver pm800_driver = {
index ada6c51..10d3637 100644 (file)
@@ -239,7 +239,7 @@ out_init:
        return ret;
 }
 
-static int pm805_remove(struct i2c_client *client)
+static void pm805_remove(struct i2c_client *client)
 {
        struct pm80x_chip *chip = i2c_get_clientdata(client);
 
@@ -247,8 +247,6 @@ static int pm805_remove(struct i2c_client *client)
        device_irq_exit_805(chip);
 
        pm80x_deinit();
-
-       return 0;
 }
 
 static struct i2c_driver pm805_driver = {
index b1e829e..5dc86dd 100644 (file)
@@ -1201,7 +1201,7 @@ static int pm860x_probe(struct i2c_client *client)
        return 0;
 }
 
-static int pm860x_remove(struct i2c_client *client)
+static void pm860x_remove(struct i2c_client *client)
 {
        struct pm860x_chip *chip = i2c_get_clientdata(client);
 
@@ -1210,7 +1210,6 @@ static int pm860x_remove(struct i2c_client *client)
                regmap_exit(chip->regmap_companion);
                i2c_unregister_device(chip->companion);
        }
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 80c2fdd..7fd8b99 100644 (file)
@@ -169,7 +169,7 @@ static int a500_ec_probe(struct i2c_client *client)
        return 0;
 }
 
-static int a500_ec_remove(struct i2c_client *client)
+static void a500_ec_remove(struct i2c_client *client)
 {
        if (of_device_is_system_power_controller(client->dev.of_node)) {
                if (pm_power_off == a500_ec_poweroff)
@@ -177,8 +177,6 @@ static int a500_ec_remove(struct i2c_client *client)
 
                unregister_restart_handler(&a500_ec_restart_handler);
        }
-
-       return 0;
 }
 
 static const struct of_device_id a500_ec_match[] = {
index 6d83e6b..bfc7cf5 100644 (file)
@@ -84,13 +84,11 @@ static int arizona_i2c_probe(struct i2c_client *i2c,
        return arizona_dev_init(arizona);
 }
 
-static int arizona_i2c_remove(struct i2c_client *i2c)
+static void arizona_i2c_remove(struct i2c_client *i2c)
 {
        struct arizona *arizona = dev_get_drvdata(&i2c->dev);
 
        arizona_dev_exit(arizona);
-
-       return 0;
 }
 
 static const struct i2c_device_id arizona_i2c_id[] = {
index 00ab480..8fd6727 100644 (file)
@@ -50,13 +50,11 @@ static int axp20x_i2c_probe(struct i2c_client *i2c,
        return axp20x_device_probe(axp20x);
 }
 
-static int axp20x_i2c_remove(struct i2c_client *i2c)
+static void axp20x_i2c_remove(struct i2c_client *i2c)
 {
        struct axp20x_dev *axp20x = i2c_get_clientdata(i2c);
 
        axp20x_device_remove(axp20x);
-
-       return 0;
 }
 
 #ifdef CONFIG_OF
index a818fbb..3f8f6ad 100644 (file)
@@ -532,12 +532,11 @@ static int da903x_probe(struct i2c_client *client,
        return da903x_add_subdevs(chip, pdata);
 }
 
-static int da903x_remove(struct i2c_client *client)
+static void da903x_remove(struct i2c_client *client)
 {
        struct da903x_chip *chip = i2c_get_clientdata(client);
 
        da903x_remove_subdevs(chip);
-       return 0;
 }
 
 static struct i2c_driver da903x_driver = {
index 8de93db..5a74696 100644 (file)
@@ -168,12 +168,11 @@ static int da9052_i2c_probe(struct i2c_client *client,
        return da9052_device_init(da9052, id->driver_data);
 }
 
-static int da9052_i2c_remove(struct i2c_client *client)
+static void da9052_i2c_remove(struct i2c_client *client)
 {
        struct da9052 *da9052 = i2c_get_clientdata(client);
 
        da9052_device_exit(da9052);
-       return 0;
 }
 
 static struct i2c_driver da9052_i2c_driver = {
index bc60433..276c7d1 100644 (file)
@@ -41,13 +41,11 @@ static int da9055_i2c_probe(struct i2c_client *i2c,
        return da9055_device_init(da9055);
 }
 
-static int da9055_i2c_remove(struct i2c_client *i2c)
+static void da9055_i2c_remove(struct i2c_client *i2c)
 {
        struct da9055 *da9055 = i2c_get_clientdata(i2c);
 
        da9055_device_exit(da9055);
-
-       return 0;
 }
 
 /*
index 2774b2c..0a80d82 100644 (file)
@@ -723,14 +723,12 @@ static int da9062_i2c_probe(struct i2c_client *i2c,
        return ret;
 }
 
-static int da9062_i2c_remove(struct i2c_client *i2c)
+static void da9062_i2c_remove(struct i2c_client *i2c)
 {
        struct da9062 *chip = i2c_get_clientdata(i2c);
 
        mfd_remove_devices(chip->dev);
        regmap_del_irq_chip(i2c->irq, chip->regmap_irq);
-
-       return 0;
 }
 
 static const struct i2c_device_id da9062_i2c_id[] = {
index 58009c8..6ae56e4 100644 (file)
@@ -471,15 +471,13 @@ regmap_irq_fail:
        return ret;
 }
 
-static int da9150_remove(struct i2c_client *client)
+static void da9150_remove(struct i2c_client *client)
 {
        struct da9150 *da9150 = i2c_get_clientdata(client);
 
        regmap_del_irq_chip(da9150->irq, da9150->regmap_irq_data);
        mfd_remove_devices(da9150->dev);
        i2c_unregister_device(da9150->core_qif);
-
-       return 0;
 }
 
 static void da9150_shutdown(struct i2c_client *client)
index 54fb6cb..759c596 100644 (file)
@@ -375,11 +375,10 @@ static void dm355evm_power_off(void)
        dm355evm_command(MSP_COMMAND_POWEROFF);
 }
 
-static int dm355evm_msp_remove(struct i2c_client *client)
+static void dm355evm_msp_remove(struct i2c_client *client)
 {
        pm_power_off = NULL;
        msp430 = NULL;
-       return 0;
 }
 
 static int
index 1b73318..3eff98e 100644 (file)
@@ -177,7 +177,7 @@ static int kb3930_probe(struct i2c_client *client)
        return 0;
 }
 
-static int kb3930_remove(struct i2c_client *client)
+static void kb3930_remove(struct i2c_client *client)
 {
        struct kb3930 *ddata = i2c_get_clientdata(client);
 
@@ -187,8 +187,6 @@ static int kb3930_remove(struct i2c_client *client)
                unregister_restart_handler(&kb3930_restart_nb);
        }
        kb3930_power_off = NULL;
-
-       return 0;
 }
 
 static const struct of_device_id kb3930_dt_ids[] = {
index d878767..9d7d870 100644 (file)
@@ -255,11 +255,9 @@ static int gsc_probe(struct i2c_client *client)
        return 0;
 }
 
-static int gsc_remove(struct i2c_client *client)
+static void gsc_remove(struct i2c_client *client)
 {
        sysfs_remove_group(&client->dev.kobj, &attr_group);
-
-       return 0;
 }
 
 static struct i2c_driver gsc_driver = {
index 5e8c94e..b824e15 100644 (file)
@@ -81,7 +81,7 @@ err_del_irq_chip:
        return ret;
 }
 
-static int intel_soc_pmic_i2c_remove(struct i2c_client *i2c)
+static void intel_soc_pmic_i2c_remove(struct i2c_client *i2c)
 {
        struct intel_soc_pmic *pmic = dev_get_drvdata(&i2c->dev);
 
@@ -91,8 +91,6 @@ static int intel_soc_pmic_i2c_remove(struct i2c_client *i2c)
        pwm_remove_table(crc_pwm_lookup, ARRAY_SIZE(crc_pwm_lookup));
 
        mfd_remove_devices(&i2c->dev);
-
-       return 0;
 }
 
 static void intel_soc_pmic_shutdown(struct i2c_client *i2c)
index 575ab67..1895fce 100644 (file)
@@ -1008,13 +1008,11 @@ static int iqs62x_probe(struct i2c_client *client)
        return ret;
 }
 
-static int iqs62x_remove(struct i2c_client *client)
+static void iqs62x_remove(struct i2c_client *client)
 {
        struct iqs62x_core *iqs62x = i2c_get_clientdata(client);
 
        wait_for_completion(&iqs62x->fw_done);
-
-       return 0;
 }
 
 static int __maybe_unused iqs62x_suspend(struct device *dev)
index 5690768..be32ffc 100644 (file)
@@ -607,15 +607,13 @@ static int lm3533_i2c_probe(struct i2c_client *i2c,
        return lm3533_device_init(lm3533);
 }
 
-static int lm3533_i2c_remove(struct i2c_client *i2c)
+static void lm3533_i2c_remove(struct i2c_client *i2c)
 {
        struct lm3533 *lm3533 = i2c_get_clientdata(i2c);
 
        dev_dbg(&i2c->dev, "%s\n", __func__);
 
        lm3533_device_exit(lm3533);
-
-       return 0;
 }
 
 static const struct i2c_device_id lm3533_i2c_ids[] = {
index c223d2c..e7c601b 100644 (file)
@@ -199,13 +199,12 @@ static int lp8788_probe(struct i2c_client *cl, const struct i2c_device_id *id)
                               ARRAY_SIZE(lp8788_devs), NULL, 0, NULL);
 }
 
-static int lp8788_remove(struct i2c_client *cl)
+static void lp8788_remove(struct i2c_client *cl)
 {
        struct lp8788 *lp = i2c_get_clientdata(cl);
 
        mfd_remove_devices(lp->dev);
        lp8788_irq_exit(lp);
-       return 0;
 }
 
 static const struct i2c_device_id lp8788_ids[] = {
index 7df5b9b..915d2f9 100644 (file)
@@ -112,13 +112,11 @@ static int madera_i2c_probe(struct i2c_client *i2c,
        return madera_dev_init(madera);
 }
 
-static int madera_i2c_remove(struct i2c_client *i2c)
+static void madera_i2c_remove(struct i2c_client *i2c)
 {
        struct madera *madera = dev_get_drvdata(&i2c->dev);
 
        madera_dev_exit(madera);
-
-       return 0;
 }
 
 static const struct i2c_device_id madera_i2c_id[] = {
index 6c487fa..d44ad6f 100644 (file)
@@ -463,7 +463,7 @@ err_max77836:
        return ret;
 }
 
-static int max14577_i2c_remove(struct i2c_client *i2c)
+static void max14577_i2c_remove(struct i2c_client *i2c)
 {
        struct max14577 *max14577 = i2c_get_clientdata(i2c);
 
@@ -471,8 +471,6 @@ static int max14577_i2c_remove(struct i2c_client *i2c)
        regmap_del_irq_chip(max14577->irq, max14577->irq_data);
        if (max14577->dev_type == MAXIM_DEVICE_TYPE_MAX77836)
                max77836_remove(max14577);
-
-       return 0;
 }
 
 static const struct i2c_device_id max14577_i2c_id[] = {
index 4e6244e..7088cb6 100644 (file)
@@ -294,7 +294,7 @@ err_i2c_haptic:
        return ret;
 }
 
-static int max77693_i2c_remove(struct i2c_client *i2c)
+static void max77693_i2c_remove(struct i2c_client *i2c)
 {
        struct max77693_dev *max77693 = i2c_get_clientdata(i2c);
 
@@ -307,8 +307,6 @@ static int max77693_i2c_remove(struct i2c_client *i2c)
 
        i2c_unregister_device(max77693->i2c_muic);
        i2c_unregister_device(max77693->i2c_haptic);
-
-       return 0;
 }
 
 static const struct i2c_device_id max77693_i2c_id[] = {
index 41f566e..c340080 100644 (file)
@@ -282,7 +282,7 @@ err_alloc_drvdata:
        return ret;
 }
 
-static int max8907_i2c_remove(struct i2c_client *i2c)
+static void max8907_i2c_remove(struct i2c_client *i2c)
 {
        struct max8907 *max8907 = i2c_get_clientdata(i2c);
 
@@ -293,8 +293,6 @@ static int max8907_i2c_remove(struct i2c_client *i2c)
        regmap_del_irq_chip(max8907->i2c_gen->irq, max8907->irqc_chg);
 
        i2c_unregister_device(max8907->i2c_rtc);
-
-       return 0;
 }
 
 #ifdef CONFIG_OF
index 114e905..04101da 100644 (file)
@@ -198,14 +198,13 @@ static int max8925_probe(struct i2c_client *client,
        return 0;
 }
 
-static int max8925_remove(struct i2c_client *client)
+static void max8925_remove(struct i2c_client *client)
 {
        struct max8925_chip *chip = i2c_get_clientdata(client);
 
        max8925_device_exit(chip);
        i2c_unregister_device(chip->adc);
        i2c_unregister_device(chip->rtc);
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index fb937f6..eb94f30 100644 (file)
@@ -85,10 +85,9 @@ static int mc13xxx_i2c_probe(struct i2c_client *client,
        return mc13xxx_common_init(&client->dev);
 }
 
-static int mc13xxx_i2c_remove(struct i2c_client *client)
+static void mc13xxx_i2c_remove(struct i2c_client *client)
 {
        mc13xxx_common_exit(&client->dev);
-       return 0;
 }
 
 static struct i2c_driver mc13xxx_i2c_driver = {
index 07e0ca2..eb08f69 100644 (file)
@@ -1222,14 +1222,13 @@ fail:
        return err;
 }
 
-static int menelaus_remove(struct i2c_client *client)
+static void menelaus_remove(struct i2c_client *client)
 {
        struct menelaus_chip    *menelaus = i2c_get_clientdata(client);
 
        free_irq(client->irq, menelaus);
        flush_work(&menelaus->work);
        the_menelaus = NULL;
-       return 0;
 }
 
 static const struct i2c_device_id menelaus_id[] = {
index b711e73..e16a7a8 100644 (file)
@@ -239,15 +239,13 @@ static int ntxec_probe(struct i2c_client *client)
        return res;
 }
 
-static int ntxec_remove(struct i2c_client *client)
+static void ntxec_remove(struct i2c_client *client)
 {
        if (client == poweroff_restart_client) {
                poweroff_restart_client = NULL;
                pm_power_off = NULL;
                unregister_restart_handler(&ntxec_restart_handler);
        }
-
-       return 0;
 }
 
 static const struct of_device_id of_ntxec_match_table[] = {
index f5b3fa9..8b7429b 100644 (file)
@@ -700,7 +700,7 @@ err_i2c:
        return ret;
 }
 
-static int palmas_i2c_remove(struct i2c_client *i2c)
+static void palmas_i2c_remove(struct i2c_client *i2c)
 {
        struct palmas *palmas = i2c_get_clientdata(i2c);
        int i;
@@ -716,8 +716,6 @@ static int palmas_i2c_remove(struct i2c_client *i2c)
                pm_power_off = NULL;
                palmas_dev = NULL;
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id palmas_i2c_id[] = {
index e9c565c..4ccc2c3 100644 (file)
@@ -273,7 +273,7 @@ err2:
        return ret;
 }
 
-static int pcf50633_remove(struct i2c_client *client)
+static void pcf50633_remove(struct i2c_client *client)
 {
        struct pcf50633 *pcf = i2c_get_clientdata(client);
        int i;
@@ -289,8 +289,6 @@ static int pcf50633_remove(struct i2c_client *client)
 
        for (i = 0; i < PCF50633_NUM_REGULATORS; i++)
                platform_device_unregister(pcf->regulator_pdev[i]);
-
-       return 0;
 }
 
 static const struct i2c_device_id pcf50633_id_table[] = {
index c748fd2..3b5acf7 100644 (file)
@@ -287,7 +287,7 @@ static int retu_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
        return 0;
 }
 
-static int retu_remove(struct i2c_client *i2c)
+static void retu_remove(struct i2c_client *i2c)
 {
        struct retu_dev *rdev = i2c_get_clientdata(i2c);
 
@@ -297,8 +297,6 @@ static int retu_remove(struct i2c_client *i2c)
        }
        mfd_remove_devices(rdev->dev);
        regmap_del_irq_chip(i2c->irq, rdev->irq_data);
-
-       return 0;
 }
 
 static const struct i2c_device_id retu_id[] = {
index 4142b63..d5d641e 100644 (file)
@@ -778,7 +778,7 @@ err_irq:
        return ret;
 }
 
-static int rk808_remove(struct i2c_client *client)
+static void rk808_remove(struct i2c_client *client)
 {
        struct rk808 *rk808 = i2c_get_clientdata(client);
 
@@ -792,8 +792,6 @@ static int rk808_remove(struct i2c_client *client)
                pm_power_off = NULL;
 
        unregister_restart_handler(&rk808_restart_handler);
-
-       return 0;
 }
 
 static int __maybe_unused rk8xx_suspend(struct device *dev)
index 384acb4..eb8005b 100644 (file)
@@ -241,7 +241,7 @@ static int rn5t618_i2c_probe(struct i2c_client *i2c)
        return rn5t618_irq_init(priv);
 }
 
-static int rn5t618_i2c_remove(struct i2c_client *i2c)
+static void rn5t618_i2c_remove(struct i2c_client *i2c)
 {
        if (i2c == rn5t618_pm_power_off) {
                rn5t618_pm_power_off = NULL;
@@ -249,8 +249,6 @@ static int rn5t618_i2c_remove(struct i2c_client *i2c)
        }
 
        unregister_restart_handler(&rn5t618_restart_handler);
-
-       return 0;
 }
 
 static int __maybe_unused rn5t618_i2c_suspend(struct device *dev)
index dc001c9..f716ab8 100644 (file)
@@ -146,13 +146,11 @@ static int rsmu_i2c_probe(struct i2c_client *client,
        return rsmu_core_init(rsmu);
 }
 
-static int rsmu_i2c_remove(struct i2c_client *client)
+static void rsmu_i2c_remove(struct i2c_client *client)
 {
        struct rsmu_ddata *rsmu = i2c_get_clientdata(client);
 
        rsmu_core_exit(rsmu);
-
-       return 0;
 }
 
 static const struct i2c_device_id rsmu_i2c_id[] = {
index fb3bd78..c6d34dc 100644 (file)
@@ -87,7 +87,7 @@ static int rt4831_probe(struct i2c_client *client)
                                    ARRAY_SIZE(rt4831_subdevs), NULL, 0, NULL);
 }
 
-static int rt4831_remove(struct i2c_client *client)
+static void rt4831_remove(struct i2c_client *client)
 {
        struct regmap *regmap = dev_get_regmap(&client->dev, NULL);
        int ret;
@@ -96,8 +96,6 @@ static int rt4831_remove(struct i2c_client *client)
        ret = regmap_update_bits(regmap, RT4831_REG_ENABLE, RT4831_RESET_MASK, RT4831_RESET_MASK);
        if (ret)
                dev_warn(&client->dev, "Failed to disable outputs (%pe)\n", ERR_PTR(ret));
-
-       return 0;
 }
 
 static const struct of_device_id __maybe_unused rt4831_of_match[] = {
index a2635c2..8166949 100644 (file)
@@ -835,7 +835,7 @@ free_gpio:
        return rval;
 }
 
-static int si476x_core_remove(struct i2c_client *client)
+static void si476x_core_remove(struct i2c_client *client)
 {
        struct si476x_core *core = i2c_get_clientdata(client);
 
@@ -851,8 +851,6 @@ static int si476x_core_remove(struct i2c_client *client)
 
        if (gpio_is_valid(core->gpio_reset))
                gpio_free(core->gpio_reset);
-
-       return 0;
 }
 
 
index 122f960..5dd7d96 100644 (file)
@@ -467,13 +467,11 @@ err_chip_exit:
        return ret;
 }
 
-static int stmfx_remove(struct i2c_client *client)
+static void stmfx_remove(struct i2c_client *client)
 {
        stmfx_irq_exit(client);
 
        stmfx_chip_exit(client);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index d3eedf3..4d55494 100644 (file)
@@ -91,13 +91,11 @@ stmpe_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
        return stmpe_probe(&i2c_ci, partnum);
 }
 
-static int stmpe_i2c_remove(struct i2c_client *i2c)
+static void stmpe_i2c_remove(struct i2c_client *i2c)
 {
        struct stmpe *stmpe = dev_get_drvdata(&i2c->dev);
 
        stmpe_remove(stmpe);
-
-       return 0;
 }
 
 static const struct i2c_device_id stmpe_i2c_id[] = {
index 13583cd..d5d0ec1 100644 (file)
@@ -429,13 +429,11 @@ static int tc3589x_probe(struct i2c_client *i2c,
        return 0;
 }
 
-static int tc3589x_remove(struct i2c_client *client)
+static void tc3589x_remove(struct i2c_client *client)
 {
        struct tc3589x *tc3589x = i2c_get_clientdata(client);
 
        mfd_remove_devices(tc3589x->dev);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index c906324..b360568 100644 (file)
@@ -179,7 +179,7 @@ static int tps6105x_probe(struct i2c_client *client,
        return ret;
 }
 
-static int tps6105x_remove(struct i2c_client *client)
+static void tps6105x_remove(struct i2c_client *client)
 {
        struct tps6105x *tps6105x = i2c_get_clientdata(client);
 
@@ -189,8 +189,6 @@ static int tps6105x_remove(struct i2c_client *client)
        regmap_update_bits(tps6105x->regmap, TPS6105X_REG_0,
                TPS6105X_REG0_MODE_MASK,
                TPS6105X_MODE_SHUTDOWN << TPS6105X_REG0_MODE_SHIFT);
-
-       return 0;
 }
 
 static const struct i2c_device_id tps6105x_id[] = {
index 7e7dbee..c2afa2e 100644 (file)
@@ -501,7 +501,7 @@ static int tps65010_gpio_get(struct gpio_chip *chip, unsigned offset)
 
 static struct tps65010 *the_tps;
 
-static int tps65010_remove(struct i2c_client *client)
+static void tps65010_remove(struct i2c_client *client)
 {
        struct tps65010         *tps = i2c_get_clientdata(client);
        struct tps65010_board   *board = dev_get_platdata(&client->dev);
@@ -517,7 +517,6 @@ static int tps65010_remove(struct i2c_client *client)
        cancel_delayed_work_sync(&tps->work);
        debugfs_remove(tps->file);
        the_tps = NULL;
-       return 0;
 }
 
 static int tps65010_probe(struct i2c_client *client,
index cbae977..81a7360 100644 (file)
@@ -111,14 +111,12 @@ static int tps65086_probe(struct i2c_client *client,
        return ret;
 }
 
-static int tps65086_remove(struct i2c_client *client)
+static void tps65086_remove(struct i2c_client *client)
 {
        struct tps65086 *tps = i2c_get_clientdata(client);
 
        if (tps->irq > 0)
                regmap_del_irq_chip(tps->irq, tps->irq_data);
-
-       return 0;
 }
 
 static const struct i2c_device_id tps65086_id_table[] = {
index 8e8da20..eebd606 100644 (file)
@@ -374,7 +374,7 @@ static int tps65217_probe(struct i2c_client *client)
        return 0;
 }
 
-static int tps65217_remove(struct i2c_client *client)
+static void tps65217_remove(struct i2c_client *client)
 {
        struct tps65217 *tps = i2c_get_clientdata(client);
        unsigned int virq;
@@ -388,8 +388,6 @@ static int tps65217_remove(struct i2c_client *client)
 
        irq_domain_remove(tps->irq_domain);
        tps->irq_domain = NULL;
-
-       return 0;
 }
 
 static const struct i2c_device_id tps65217_id_table[] = {
index c9303d3..fb340da 100644 (file)
@@ -579,7 +579,7 @@ err_mfd_add:
        return ret;
 }
 
-static int tps6586x_i2c_remove(struct i2c_client *client)
+static void tps6586x_i2c_remove(struct i2c_client *client)
 {
        struct tps6586x *tps6586x = i2c_get_clientdata(client);
 
@@ -587,7 +587,6 @@ static int tps6586x_i2c_remove(struct i2c_client *client)
        mfd_remove_devices(tps6586x->dev);
        if (client->irq)
                free_irq(client->irq, tps6586x);
-       return 0;
 }
 
 static int __maybe_unused tps6586x_i2c_suspend(struct device *dev)
index afb7f7d..7e2b19e 100644 (file)
@@ -43,13 +43,11 @@ static int tps65912_i2c_probe(struct i2c_client *client,
        return tps65912_device_init(tps);
 }
 
-static int tps65912_i2c_remove(struct i2c_client *client)
+static void tps65912_i2c_remove(struct i2c_client *client)
 {
        struct tps65912 *tps = i2c_get_clientdata(client);
 
        tps65912_device_exit(tps);
-
-       return 0;
 }
 
 static const struct i2c_device_id tps65912_i2c_id_table[] = {
index 2cb9326..2679c41 100644 (file)
@@ -727,7 +727,7 @@ static void clocks_init(struct device *dev)
 /*----------------------------------------------------------------------*/
 
 
-static int twl_remove(struct i2c_client *client)
+static void twl_remove(struct i2c_client *client)
 {
        unsigned i, num_slaves;
 
@@ -745,7 +745,6 @@ static int twl_remove(struct i2c_client *client)
                twl->client = NULL;
        }
        twl_priv->ready = false;
-       return 0;
 }
 
 static struct of_dev_auxdata twl_auxdata_lookup[] = {
index b9c6d94..f429b8f 100644 (file)
@@ -808,7 +808,7 @@ gpio_err:
        return ret;
 }
 
-static int twl6040_remove(struct i2c_client *client)
+static void twl6040_remove(struct i2c_client *client)
 {
        struct twl6040 *twl6040 = i2c_get_clientdata(client);
 
@@ -820,8 +820,6 @@ static int twl6040_remove(struct i2c_client *client)
        mfd_remove_devices(&client->dev);
 
        regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies);
-
-       return 0;
 }
 
 static const struct i2c_device_id twl6040_i2c_id[] = {
index 7b1d270..7e88f5b 100644 (file)
@@ -657,13 +657,11 @@ static int wm8994_i2c_probe(struct i2c_client *i2c,
        return wm8994_device_init(wm8994, i2c->irq);
 }
 
-static int wm8994_i2c_remove(struct i2c_client *i2c)
+static void wm8994_i2c_remove(struct i2c_client *i2c)
 {
        struct wm8994 *wm8994 = i2c_get_clientdata(i2c);
 
        wm8994_device_exit(wm8994);
-
-       return 0;
 }
 
 static const struct i2c_device_id wm8994_i2c_id[] = {
index 0ee0c6d..28ffb43 100644 (file)
@@ -67,10 +67,9 @@ static int ad_dpot_i2c_probe(struct i2c_client *client,
        return ad_dpot_probe(&client->dev, &bdata, id->driver_data, id->name);
 }
 
-static int ad_dpot_i2c_remove(struct i2c_client *client)
+static void ad_dpot_i2c_remove(struct i2c_client *client)
 {
        ad_dpot_remove(&client->dev);
-       return 0;
 }
 
 static const struct i2c_device_id ad_dpot_id[] = {
index 6fff44b..a32431f 100644 (file)
@@ -242,7 +242,7 @@ als_error1:
        return res;
 }
 
-static int apds9802als_remove(struct i2c_client *client)
+static void apds9802als_remove(struct i2c_client *client)
 {
        struct als_data *data = i2c_get_clientdata(client);
 
@@ -256,7 +256,6 @@ static int apds9802als_remove(struct i2c_client *client)
        pm_runtime_put_noidle(&client->dev);
 
        kfree(data);
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 45f5b99..e2100cc 100644 (file)
@@ -1185,7 +1185,7 @@ fail1:
        return err;
 }
 
-static int apds990x_remove(struct i2c_client *client)
+static void apds990x_remove(struct i2c_client *client)
 {
        struct apds990x_chip *chip = i2c_get_clientdata(client);
 
@@ -1205,7 +1205,6 @@ static int apds990x_remove(struct i2c_client *client)
        regulator_bulk_free(ARRAY_SIZE(chip->regs), chip->regs);
 
        kfree(chip);
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 0581bb9..d0dfa67 100644 (file)
@@ -1280,7 +1280,7 @@ fail0:
        return err;
 }
 
-static int bh1770_remove(struct i2c_client *client)
+static void bh1770_remove(struct i2c_client *client)
 {
        struct bh1770_chip *chip = i2c_get_clientdata(client);
 
@@ -1299,8 +1299,6 @@ static int bh1770_remove(struct i2c_client *client)
 
        pm_runtime_disable(&client->dev);
        pm_runtime_set_suspended(&client->dev);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 42f316c..0698ddc 100644 (file)
@@ -228,11 +228,10 @@ static int ds1682_probe(struct i2c_client *client,
        return rc;
 }
 
-static int ds1682_remove(struct i2c_client *client)
+static void ds1682_remove(struct i2c_client *client)
 {
        sysfs_remove_bin_file(&client->dev.kobj, &ds1682_eeprom_attr);
        sysfs_remove_group(&client->dev.kobj, &ds1682_group);
-       return 0;
 }
 
 static const struct i2c_device_id ds1682_id[] = {
index 633e1cf..938c4f4 100644 (file)
@@ -791,7 +791,7 @@ static int at24_probe(struct i2c_client *client)
        return 0;
 }
 
-static int at24_remove(struct i2c_client *client)
+static void at24_remove(struct i2c_client *client)
 {
        struct at24_data *at24 = i2c_get_clientdata(client);
 
@@ -801,8 +801,6 @@ static int at24_remove(struct i2c_client *client)
                        regulator_disable(at24->vcc_reg);
                pm_runtime_set_suspended(&client->dev);
        }
-
-       return 0;
 }
 
 static int __maybe_unused at24_suspend(struct device *dev)
index 9fbfe78..c8c6deb 100644 (file)
@@ -219,14 +219,12 @@ static int ee1004_probe(struct i2c_client *client)
        return err;
 }
 
-static int ee1004_remove(struct i2c_client *client)
+static void ee1004_remove(struct i2c_client *client)
 {
        /* Remove page select clients if this is the last device */
        mutex_lock(&ee1004_bus_lock);
        ee1004_cleanup(EE1004_NUM_PAGES);
        mutex_unlock(&ee1004_bus_lock);
-
-       return 0;
 }
 
 /*-------------------------------------------------------------------------*/
index 34fa385..4a9445f 100644 (file)
@@ -183,11 +183,9 @@ static int eeprom_probe(struct i2c_client *client,
        return sysfs_create_bin_file(&client->dev.kobj, &eeprom_attr);
 }
 
-static int eeprom_remove(struct i2c_client *client)
+static void eeprom_remove(struct i2c_client *client)
 {
        sysfs_remove_bin_file(&client->dev.kobj, &eeprom_attr);
-
-       return 0;
 }
 
 static const struct i2c_device_id eeprom_id[] = {
index 9aec333..ada2a3a 100644 (file)
@@ -1405,7 +1405,7 @@ err_free_pdev:
 /*
  * idt_remove() - IDT 89HPESx driver remove() callback method
  */
-static int idt_remove(struct i2c_client *client)
+static void idt_remove(struct i2c_client *client)
 {
        struct idt_89hpesx_dev *pdev = i2c_get_clientdata(client);
 
@@ -1417,8 +1417,6 @@ static int idt_remove(struct i2c_client *client)
 
        /* Discard driver data structure */
        idt_free_pdev(pdev);
-
-       return 0;
 }
 
 /*
index 9da81f6..6bd4f43 100644 (file)
@@ -173,7 +173,7 @@ exit_kfree:
        return err;
 }
 
-static int max6875_remove(struct i2c_client *client)
+static void max6875_remove(struct i2c_client *client)
 {
        struct max6875_data *data = i2c_get_clientdata(client);
 
@@ -181,8 +181,6 @@ static int max6875_remove(struct i2c_client *client)
 
        sysfs_remove_bin_file(&client->dev.kobj, &user_eeprom_attr);
        kfree(data);
-
-       return 0;
 }
 
 static const struct i2c_device_id max6875_id[] = {
index 572a2ff..42b9ade 100644 (file)
@@ -116,10 +116,9 @@ static int hmc6352_probe(struct i2c_client *client,
        return 0;
 }
 
-static int hmc6352_remove(struct i2c_client *client)
+static void hmc6352_remove(struct i2c_client *client)
 {
        sysfs_remove_group(&client->dev.kobj, &m_compass_gr);
-       return 0;
 }
 
 static const struct i2c_device_id hmc6352_id[] = {
index 0f9ea75..2c4bb6d 100644 (file)
@@ -93,7 +93,7 @@ static int ics932s401_probe(struct i2c_client *client,
                         const struct i2c_device_id *id);
 static int ics932s401_detect(struct i2c_client *client,
                          struct i2c_board_info *info);
-static int ics932s401_remove(struct i2c_client *client);
+static void ics932s401_remove(struct i2c_client *client);
 
 static const struct i2c_device_id ics932s401_id[] = {
        { "ics932s401", 0 },
@@ -460,13 +460,12 @@ exit:
        return err;
 }
 
-static int ics932s401_remove(struct i2c_client *client)
+static void ics932s401_remove(struct i2c_client *client)
 {
        struct ics932s401_data *data = i2c_get_clientdata(client);
 
        sysfs_remove_group(&client->dev.kobj, &data->attrs);
        kfree(data);
-       return 0;
 }
 
 module_i2c_driver(ics932s401_driver);
index 703d20e..8ab61be 100644 (file)
@@ -410,12 +410,11 @@ exit_kfree:
        return err;
 }
 
-static int isl29003_remove(struct i2c_client *client)
+static void isl29003_remove(struct i2c_client *client)
 {
        sysfs_remove_group(&client->dev.kobj, &isl29003_attr_group);
        isl29003_set_power_state(client, 0);
        kfree(i2c_get_clientdata(client));
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index fc5ff28..c6f2a94 100644 (file)
@@ -171,11 +171,10 @@ static int  isl29020_probe(struct i2c_client *client,
        return res;
 }
 
-static int isl29020_remove(struct i2c_client *client)
+static void isl29020_remove(struct i2c_client *client)
 {
        pm_runtime_disable(&client->dev);
        sysfs_remove_group(&client->dev.kobj, &m_als_gr);
-       return 0;
 }
 
 static const struct i2c_device_id isl29020_id[] = {
index 52555d2..d7daa01 100644 (file)
@@ -177,7 +177,7 @@ fail:
        return ret;
 }
 
-static int lis3lv02d_i2c_remove(struct i2c_client *client)
+static void lis3lv02d_i2c_remove(struct i2c_client *client)
 {
        struct lis3lv02d *lis3 = i2c_get_clientdata(client);
        struct lis3lv02d_platform_data *pdata = client->dev.platform_data;
@@ -190,7 +190,6 @@ static int lis3lv02d_i2c_remove(struct i2c_client *client)
 
        regulator_bulk_free(ARRAY_SIZE(lis3->regulators),
                            lis3_dev.regulators);
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 6d71865..1652fb9 100644 (file)
@@ -389,7 +389,7 @@ exit:
        return err;
 }
 
-static int tsl2550_remove(struct i2c_client *client)
+static void tsl2550_remove(struct i2c_client *client)
 {
        sysfs_remove_group(&client->dev.kobj, &tsl2550_attr_group);
 
@@ -397,8 +397,6 @@ static int tsl2550_remove(struct i2c_client *client)
        tsl2550_set_power_state(client, 0);
 
        kfree(i2c_get_clientdata(client));
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 946ba80..5fcefcd 100644 (file)
@@ -195,7 +195,7 @@ static void pismo_add_one(struct pismo_data *pismo, int i,
        }
 }
 
-static int pismo_remove(struct i2c_client *client)
+static void pismo_remove(struct i2c_client *client)
 {
        struct pismo_data *pismo = i2c_get_clientdata(client);
        int i;
@@ -204,8 +204,6 @@ static int pismo_remove(struct i2c_client *client)
                platform_device_unregister(pismo->dev[i]);
 
        kfree(pismo);
-
-       return 0;
 }
 
 static int pismo_probe(struct i2c_client *client,
index 79be5fc..7d746cd 100644 (file)
@@ -65,16 +65,14 @@ static int lan9303_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lan9303_i2c_remove(struct i2c_client *client)
+static void lan9303_i2c_remove(struct i2c_client *client)
 {
        struct lan9303_i2c *sw_dev = i2c_get_clientdata(client);
 
        if (!sw_dev)
-               return 0;
+               return;
 
        lan9303_remove(&sw_dev->chip);
-
-       return 0;
 }
 
 static void lan9303_i2c_shutdown(struct i2c_client *client)
index e111756..3763930 100644 (file)
@@ -52,14 +52,12 @@ static int ksz9477_i2c_probe(struct i2c_client *i2c,
        return 0;
 }
 
-static int ksz9477_i2c_remove(struct i2c_client *i2c)
+static void ksz9477_i2c_remove(struct i2c_client *i2c)
 {
        struct ksz_device *dev = i2c_get_clientdata(i2c);
 
        if (dev)
                ksz_switch_remove(dev);
-
-       return 0;
 }
 
 static void ksz9477_i2c_shutdown(struct i2c_client *i2c)
index cd533b9..54065cd 100644 (file)
@@ -105,16 +105,14 @@ static int xrs700x_i2c_probe(struct i2c_client *i2c,
        return 0;
 }
 
-static int xrs700x_i2c_remove(struct i2c_client *i2c)
+static void xrs700x_i2c_remove(struct i2c_client *i2c)
 {
        struct xrs700x *priv = i2c_get_clientdata(i2c);
 
        if (!priv)
-               return 0;
+               return;
 
        xrs700x_switch_remove(priv);
-
-       return 0;
 }
 
 static void xrs700x_i2c_shutdown(struct i2c_client *i2c)
index 716c73e..f5f5f8d 100644 (file)
@@ -740,15 +740,13 @@ errout:
        return err;
 }
 
-static int mlxsw_i2c_remove(struct i2c_client *client)
+static void mlxsw_i2c_remove(struct i2c_client *client)
 {
        struct mlxsw_i2c *mlxsw_i2c = i2c_get_clientdata(client);
 
        mlxsw_core_bus_device_unregister(mlxsw_i2c->core, false);
        mlxsw_i2c_irq_fini(mlxsw_i2c);
        mutex_destroy(&mlxsw_i2c->cmd.lock);
-
-       return 0;
 }
 
 int mlxsw_i2c_driver_register(struct i2c_driver *i2c_driver)
index 53846c6..0762c73 100644 (file)
@@ -986,7 +986,7 @@ out:
        return rc;
 }
 
-static int mctp_i2c_remove(struct i2c_client *client)
+static void mctp_i2c_remove(struct i2c_client *client)
 {
        struct mctp_i2c_client *mcli = i2c_get_clientdata(client);
        struct mctp_i2c_dev *midev = NULL, *tmp = NULL;
@@ -999,8 +999,6 @@ static int mctp_i2c_remove(struct i2c_client *client)
 
        mctp_i2c_free_client(mcli);
        mutex_unlock(&driver_clients_lock);
-       /* Callers ignore return code */
-       return 0;
 }
 
 /* We look for a 'mctp-controller' property on I2C busses as they are
index 28a9e1e..2d53e0f 100644 (file)
@@ -336,14 +336,12 @@ static int fdp_nci_i2c_probe(struct i2c_client *client)
        return 0;
 }
 
-static int fdp_nci_i2c_remove(struct i2c_client *client)
+static void fdp_nci_i2c_remove(struct i2c_client *client)
 {
        struct fdp_i2c_phy *phy = i2c_get_clientdata(client);
 
        fdp_nci_remove(phy->ndev);
        fdp_nci_i2c_disable(phy);
-
-       return 0;
 }
 
 static const struct acpi_device_id fdp_nci_i2c_acpi_match[] = {
index 0672951..5eaa18f 100644 (file)
@@ -268,15 +268,13 @@ err_irq:
        return r;
 }
 
-static int microread_i2c_remove(struct i2c_client *client)
+static void microread_i2c_remove(struct i2c_client *client)
 {
        struct microread_i2c_phy *phy = i2c_get_clientdata(client);
 
        microread_remove(phy->hdev);
 
        free_irq(client->irq, phy);
-
-       return 0;
 }
 
 static const struct i2c_device_id microread_i2c_id[] = {
index 01329b9..acef0cf 100644 (file)
@@ -231,13 +231,11 @@ static int nfcmrvl_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int nfcmrvl_i2c_remove(struct i2c_client *client)
+static void nfcmrvl_i2c_remove(struct i2c_client *client)
 {
        struct nfcmrvl_i2c_drv_data *drv_data = i2c_get_clientdata(client);
 
        nfcmrvl_nci_unregister_dev(drv_data->priv);
-
-       return 0;
 }
 
 
index ae2ba08..ec64465 100644 (file)
@@ -314,14 +314,12 @@ static int nxp_nci_i2c_probe(struct i2c_client *client,
        return r;
 }
 
-static int nxp_nci_i2c_remove(struct i2c_client *client)
+static void nxp_nci_i2c_remove(struct i2c_client *client)
 {
        struct nxp_nci_i2c_phy *phy = i2c_get_clientdata(client);
 
        nxp_nci_remove(phy->ndev);
        free_irq(client->irq, phy);
-
-       return 0;
 }
 
 static const struct i2c_device_id nxp_nci_i2c_id_table[] = {
index 673eb5e..ddf3db2 100644 (file)
@@ -227,7 +227,7 @@ nfc_alloc_err:
        return r;
 }
 
-static int pn533_i2c_remove(struct i2c_client *client)
+static void pn533_i2c_remove(struct i2c_client *client)
 {
        struct pn533_i2c_phy *phy = i2c_get_clientdata(client);
 
@@ -235,8 +235,6 @@ static int pn533_i2c_remove(struct i2c_client *client)
 
        pn53x_unregister_nfc(phy->priv);
        pn53x_common_clean(phy->priv);
-
-       return 0;
 }
 
 static const struct of_device_id of_pn533_i2c_match[] __maybe_unused = {
index 62a0f1a..9e754ab 100644 (file)
@@ -928,7 +928,7 @@ static int pn544_hci_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int pn544_hci_i2c_remove(struct i2c_client *client)
+static void pn544_hci_i2c_remove(struct i2c_client *client)
 {
        struct pn544_i2c_phy *phy = i2c_get_clientdata(client);
 
@@ -940,8 +940,6 @@ static int pn544_hci_i2c_remove(struct i2c_client *client)
 
        if (phy->powered)
                pn544_hci_i2c_disable(phy);
-
-       return 0;
 }
 
 static const struct of_device_id of_pn544_i2c_match[] __maybe_unused = {
index 4d1cf1b..f824dc7 100644 (file)
@@ -246,14 +246,12 @@ disable_clk:
        return ret;
 }
 
-static int s3fwrn5_i2c_remove(struct i2c_client *client)
+static void s3fwrn5_i2c_remove(struct i2c_client *client)
 {
        struct s3fwrn5_i2c_phy *phy = i2c_get_clientdata(client);
 
        s3fwrn5_remove(phy->common.ndev);
        clk_disable_unprepare(phy->clk);
-
-       return 0;
 }
 
 static const struct i2c_device_id s3fwrn5_i2c_id_table[] = {
index cbd968f..89fa24d 100644 (file)
@@ -250,13 +250,11 @@ static int st_nci_i2c_probe(struct i2c_client *client,
        return r;
 }
 
-static int st_nci_i2c_remove(struct i2c_client *client)
+static void st_nci_i2c_remove(struct i2c_client *client)
 {
        struct st_nci_i2c_phy *phy = i2c_get_clientdata(client);
 
        ndlc_remove(phy->ndlc);
-
-       return 0;
 }
 
 static const struct i2c_device_id st_nci_i2c_id_table[] = {
index 42dc0e5..76b5598 100644 (file)
@@ -562,7 +562,7 @@ out_free:
        return r;
 }
 
-static int st21nfca_hci_i2c_remove(struct i2c_client *client)
+static void st21nfca_hci_i2c_remove(struct i2c_client *client)
 {
        struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client);
 
@@ -571,8 +571,6 @@ static int st21nfca_hci_i2c_remove(struct i2c_client *client)
        if (phy->powered)
                st21nfca_hci_i2c_disable(phy);
        kfree_skb(phy->pending_skb);
-
-       return 0;
 }
 
 static const struct i2c_device_id st21nfca_hci_i2c_id_table[] = {
index eafa8ff..f961455 100644 (file)
@@ -2524,13 +2524,12 @@ static int unittest_i2c_dev_probe(struct i2c_client *client,
        return 0;
 };
 
-static int unittest_i2c_dev_remove(struct i2c_client *client)
+static void unittest_i2c_dev_remove(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device_node *np = client->dev.of_node;
 
        dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
-       return 0;
 }
 
 static const struct i2c_device_id unittest_i2c_dev_id[] = {
@@ -2601,7 +2600,7 @@ static int unittest_i2c_mux_probe(struct i2c_client *client,
        return 0;
 };
 
-static int unittest_i2c_mux_remove(struct i2c_client *client)
+static void unittest_i2c_mux_remove(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct device_node *np = client->dev.of_node;
@@ -2609,7 +2608,6 @@ static int unittest_i2c_mux_remove(struct i2c_client *client)
 
        dev_dbg(dev, "%s for node @%pOF\n", __func__, np);
        i2c_mux_del_adapters(muxc);
-       return 0;
 }
 
 static const struct i2c_device_id unittest_i2c_mux_id[] = {
index 9f5b957..b6823c6 100644 (file)
@@ -317,13 +317,11 @@ static int cros_ec_i2c_probe(struct i2c_client *client,
        return 0;
 }
 
-static int cros_ec_i2c_remove(struct i2c_client *client)
+static void cros_ec_i2c_remove(struct i2c_client *client)
 {
        struct cros_ec_device *ec_dev = i2c_get_clientdata(client);
 
        cros_ec_unregister(ec_dev);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 444ec81..3b20ddd 100644 (file)
@@ -554,7 +554,7 @@ out_err:
        return error;
 }
 
-static int mshw0011_remove(struct i2c_client *client)
+static void mshw0011_remove(struct i2c_client *client)
 {
        struct mshw0011_data *cdata = i2c_get_clientdata(client);
 
@@ -564,8 +564,6 @@ static int mshw0011_remove(struct i2c_client *client)
                kthread_stop(cdata->poll_task);
 
        i2c_unregister_device(cdata->bat0);
-
-       return 0;
 }
 
 static const struct acpi_device_id mshw0011_acpi_match[] = {
index 6fd0c9f..62310e0 100644 (file)
@@ -878,14 +878,12 @@ static int tf103c_dock_probe(struct i2c_client *client)
        return 0;
 }
 
-static int tf103c_dock_remove(struct i2c_client *client)
+static void tf103c_dock_remove(struct i2c_client *client)
 {
        struct tf103c_dock_data *dock = i2c_get_clientdata(client);
 
        tf103c_dock_stop_hpd(dock);
        tf103c_dock_disable(dock);
-
-       return 0;
 }
 
 static int __maybe_unused tf103c_dock_suspend(struct device *dev)
index 49fc379..f83e9c3 100644 (file)
@@ -227,7 +227,7 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
        return ret;
 }
 
-static int skl_int3472_tps68470_remove(struct i2c_client *client)
+static void skl_int3472_tps68470_remove(struct i2c_client *client)
 {
        const struct int3472_tps68470_board_data *board_data;
        int i;
@@ -237,8 +237,6 @@ static int skl_int3472_tps68470_remove(struct i2c_client *client)
                for (i = 0; i < board_data->n_gpiod_lookups; i++)
                        gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
        }
-
-       return 0;
 }
 
 static const struct acpi_device_id int3472_device_id[] = {
index 5724001..6b99e1c 100644 (file)
@@ -1696,7 +1696,7 @@ error_1:
 
 /* main bq2415x remove function */
 
-static int bq2415x_remove(struct i2c_client *client)
+static void bq2415x_remove(struct i2c_client *client)
 {
        struct bq2415x_device *bq = i2c_get_clientdata(client);
 
@@ -1715,8 +1715,6 @@ static int bq2415x_remove(struct i2c_client *client)
        dev_info(bq->dev, "driver unregistered\n");
 
        kfree(bq->name);
-
-       return 0;
 }
 
 static const struct i2c_device_id bq2415x_i2c_id_table[] = {
index 27f5c76..2274679 100644 (file)
@@ -1901,7 +1901,7 @@ out_pmrt:
        return ret;
 }
 
-static int bq24190_remove(struct i2c_client *client)
+static void bq24190_remove(struct i2c_client *client)
 {
        struct bq24190_dev_info *bdi = i2c_get_clientdata(client);
        int error;
@@ -1918,8 +1918,6 @@ static int bq24190_remove(struct i2c_client *client)
                pm_runtime_put_sync(bdi->dev);
        pm_runtime_dont_use_autosuspend(bdi->dev);
        pm_runtime_disable(bdi->dev);
-
-       return 0;
 }
 
 static void bq24190_shutdown(struct i2c_client *client)
index ecba9ab..a309bbe 100644 (file)
@@ -1077,7 +1077,7 @@ static int bq24257_probe(struct i2c_client *client,
        return 0;
 }
 
-static int bq24257_remove(struct i2c_client *client)
+static void bq24257_remove(struct i2c_client *client)
 {
        struct bq24257_device *bq = i2c_get_clientdata(client);
 
@@ -1085,8 +1085,6 @@ static int bq24257_remove(struct i2c_client *client)
                cancel_delayed_work_sync(&bq->iilimit_setup_work);
 
        bq24257_field_write(bq, F_RESET, 1); /* reset to defaults */
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 852a6fe..06ea739 100644 (file)
@@ -1258,7 +1258,7 @@ err_unregister_usb_notifier:
        return ret;
 }
 
-static int bq25890_remove(struct i2c_client *client)
+static void bq25890_remove(struct i2c_client *client)
 {
        struct bq25890_device *bq = i2c_get_clientdata(client);
 
@@ -1269,8 +1269,6 @@ static int bq25890_remove(struct i2c_client *client)
                /* reset all registers to default values */
                bq25890_chip_reset(bq);
        }
-
-       return 0;
 }
 
 static void bq25890_shutdown(struct i2c_client *client)
index cf38cbf..94b00bb 100644 (file)
@@ -205,7 +205,7 @@ err_failed:
        return ret;
 }
 
-static int bq27xxx_battery_i2c_remove(struct i2c_client *client)
+static void bq27xxx_battery_i2c_remove(struct i2c_client *client)
 {
        struct bq27xxx_device_info *di = i2c_get_clientdata(client);
 
@@ -214,8 +214,6 @@ static int bq27xxx_battery_i2c_remove(struct i2c_client *client)
        mutex_lock(&battery_mutex);
        idr_remove(&battery_id, di->id);
        mutex_unlock(&battery_mutex);
-
-       return 0;
 }
 
 static const struct i2c_device_id bq27xxx_i2c_id_table[] = {
index 728e2a6..81e17ad 100644 (file)
@@ -725,13 +725,12 @@ static int __maybe_unused cw_bat_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(cw_bat_pm_ops, cw_bat_suspend, cw_bat_resume);
 
-static int cw_bat_remove(struct i2c_client *client)
+static void cw_bat_remove(struct i2c_client *client)
 {
        struct cw_battery *cw_bat = i2c_get_clientdata(client);
 
        cancel_delayed_work_sync(&cw_bat->battery_delay_work);
        power_supply_put_battery_info(cw_bat->rk_bat, cw_bat->battery);
-       return 0;
 }
 
 static const struct i2c_device_id cw_bat_id_table[] = {
index 9ae273f..d78cd05 100644 (file)
@@ -312,7 +312,7 @@ static void ds278x_power_supply_init(struct power_supply_desc *battery)
        battery->external_power_changed = NULL;
 }
 
-static int ds278x_battery_remove(struct i2c_client *client)
+static void ds278x_battery_remove(struct i2c_client *client)
 {
        struct ds278x_info *info = i2c_get_clientdata(client);
        int id = info->id;
@@ -325,8 +325,6 @@ static int ds278x_battery_remove(struct i2c_client *client)
        mutex_lock(&battery_lock);
        idr_remove(&battery_id, id);
        mutex_unlock(&battery_lock);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 9ee54e3..384a374 100644 (file)
@@ -590,13 +590,12 @@ static int lp8727_probe(struct i2c_client *cl, const struct i2c_device_id *id)
        return 0;
 }
 
-static int lp8727_remove(struct i2c_client *cl)
+static void lp8727_remove(struct i2c_client *cl)
 {
        struct lp8727_chg *pchg = i2c_get_clientdata(cl);
 
        lp8727_release_irq(pchg);
        lp8727_unregister_psy(pchg);
-       return 0;
 }
 
 static const struct of_device_id lp8727_dt_ids[] = {
index 7a23c70..736dec6 100644 (file)
@@ -149,13 +149,11 @@ static int rt5033_battery_probe(struct i2c_client *client,
        return 0;
 }
 
-static int rt5033_battery_remove(struct i2c_client *client)
+static void rt5033_battery_remove(struct i2c_client *client)
 {
        struct rt5033_battery *battery = i2c_get_clientdata(client);
 
        power_supply_unregister(battery->psy);
-
-       return 0;
 }
 
 static const struct i2c_device_id rt5033_battery_id[] = {
index 74ee543..7296228 100644 (file)
@@ -1698,7 +1698,7 @@ put_usb_notifier:
        return ret;
 }
 
-static int rt9455_remove(struct i2c_client *client)
+static void rt9455_remove(struct i2c_client *client)
 {
        int ret;
        struct rt9455_info *info = i2c_get_clientdata(client);
@@ -1715,8 +1715,6 @@ static int rt9455_remove(struct i2c_client *client)
        cancel_delayed_work_sync(&info->pwr_rdy_work);
        cancel_delayed_work_sync(&info->max_charging_time_work);
        cancel_delayed_work_sync(&info->batt_presence_work);
-
-       return 0;
 }
 
 static const struct i2c_device_id rt9455_i2c_id_table[] = {
index 1511f71..996a82f 100644 (file)
@@ -1595,14 +1595,12 @@ static int smb347_probe(struct i2c_client *client,
        return 0;
 }
 
-static int smb347_remove(struct i2c_client *client)
+static void smb347_remove(struct i2c_client *client)
 {
        struct smb347_charger *smb = i2c_get_clientdata(client);
 
        smb347_usb_vbus_regulator_disable(smb->usb_rdev);
        smb347_irq_disable(smb);
-
-       return 0;
 }
 
 static void smb347_shutdown(struct i2c_client *client)
index 7ed4e4b..1897c29 100644 (file)
@@ -251,7 +251,7 @@ err:
        return ret;
 }
 
-static int z2_batt_remove(struct i2c_client *client)
+static void z2_batt_remove(struct i2c_client *client)
 {
        struct z2_charger *charger = i2c_get_clientdata(client);
 
@@ -263,8 +263,6 @@ static int z2_batt_remove(struct i2c_client *client)
                free_irq(gpiod_to_irq(charger->charge_gpiod), charger);
 
        kfree(charger);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index c91fa7f..f230c10 100644 (file)
@@ -598,7 +598,7 @@ static int pca9685_pwm_probe(struct i2c_client *client,
        return 0;
 }
 
-static int pca9685_pwm_remove(struct i2c_client *client)
+static void pca9685_pwm_remove(struct i2c_client *client)
 {
        struct pca9685 *pca = i2c_get_clientdata(client);
 
@@ -610,8 +610,6 @@ static int pca9685_pwm_remove(struct i2c_client *client)
        }
 
        pm_runtime_disable(&client->dev);
-
-       return 0;
 }
 
 static int __maybe_unused pca9685_pwm_runtime_suspend(struct device *dev)
index 76e0e23..e4c753b 100644 (file)
@@ -1164,7 +1164,7 @@ error:
        return ret;
 }
 
-static int da9121_i2c_remove(struct i2c_client *i2c)
+static void da9121_i2c_remove(struct i2c_client *i2c)
 {
        struct da9121 *chip = i2c_get_clientdata(i2c);
        const int mask_all[4] = { 0xFF, 0xFF, 0xFF, 0xFF };
@@ -1176,7 +1176,6 @@ static int da9121_i2c_remove(struct i2c_client *i2c)
        ret = regmap_bulk_write(chip->regmap, DA9121_REG_SYS_MASK_0, mask_all, 4);
        if (ret != 0)
                dev_err(chip->dev, "Failed to set IRQ masks: %d\n", ret);
-       return 0;
 }
 
 static const struct i2c_device_id da9121_i2c_id[] = {
index 321bec6..31b4342 100644 (file)
@@ -422,15 +422,13 @@ err:
        return ret;
 }
 
-static int lp8755_remove(struct i2c_client *client)
+static void lp8755_remove(struct i2c_client *client)
 {
        int icnt;
        struct lp8755_chip *pchip = i2c_get_clientdata(client);
 
        for (icnt = 0; icnt < LP8755_BUCK_MAX; icnt++)
                regmap_write(pchip->regmap, icnt, 0x00);
-
-       return 0;
 }
 
 static const struct i2c_device_id lp8755_id[] = {
index 105f694..308f797 100644 (file)
@@ -381,13 +381,11 @@ error:
        return ret;
 }
 
-static int attiny_i2c_remove(struct i2c_client *client)
+static void attiny_i2c_remove(struct i2c_client *client)
 {
        struct attiny_lcd *state = i2c_get_clientdata(client);
 
        mutex_destroy(&state->lock);
-
-       return 0;
 }
 
 static const struct of_device_id attiny_dt_ids[] = {
index e0bbb11..6d6a55e 100644 (file)
@@ -297,11 +297,9 @@ static int bq32k_probe(struct i2c_client *client)
        return 0;
 }
 
-static int bq32k_remove(struct i2c_client *client)
+static void bq32k_remove(struct i2c_client *client)
 {
        bq32k_sysfs_unregister(&client->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id bq32k_id[] = {
index b19de51..7f089f0 100644 (file)
@@ -530,7 +530,7 @@ static int ds1374_probe(struct i2c_client *client)
        return 0;
 }
 
-static int ds1374_remove(struct i2c_client *client)
+static void ds1374_remove(struct i2c_client *client)
 {
        struct ds1374 *ds1374 = i2c_get_clientdata(client);
 
@@ -542,8 +542,6 @@ static int ds1374_remove(struct i2c_client *client)
                devm_free_irq(&client->dev, client->irq, client);
                cancel_work_sync(&ds1374->work);
        }
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 1fc6627..1bfca39 100644 (file)
@@ -472,12 +472,11 @@ static int isl12026_probe_new(struct i2c_client *client)
        return devm_rtc_register_device(priv->rtc);
 }
 
-static int isl12026_remove(struct i2c_client *client)
+static void isl12026_remove(struct i2c_client *client)
 {
        struct isl12026 *priv = i2c_get_clientdata(client);
 
        i2c_unregister_device(priv->nvm_client);
-       return 0;
 }
 
 static const struct of_device_id isl12026_dt_match[] = {
index d868458..e0b4d37 100644 (file)
@@ -989,7 +989,7 @@ static int m41t80_probe(struct i2c_client *client,
        return 0;
 }
 
-static int m41t80_remove(struct i2c_client *client)
+static void m41t80_remove(struct i2c_client *client)
 {
 #ifdef CONFIG_RTC_DRV_M41T80_WDT
        struct m41t80_data *clientdata = i2c_get_clientdata(client);
@@ -999,8 +999,6 @@ static int m41t80_remove(struct i2c_client *client)
                unregister_reboot_notifier(&wdt_notifier);
        }
 #endif
-
-       return 0;
 }
 
 static struct i2c_driver m41t80_driver = {
index cb15983..9562c47 100644 (file)
@@ -910,10 +910,9 @@ exit:
        return err;
 }
 
-static int rs5c372_remove(struct i2c_client *client)
+static void rs5c372_remove(struct i2c_client *client)
 {
        rs5c_sysfs_unregister(&client->dev);
-       return 0;
 }
 
 static struct i2c_driver rs5c372_driver = {
index ba0d22a..f587afa 100644 (file)
@@ -657,10 +657,9 @@ static int x1205_probe(struct i2c_client *client)
        return 0;
 }
 
-static int x1205_remove(struct i2c_client *client)
+static void x1205_remove(struct i2c_client *client)
 {
        x1205_sysfs_unregister(&client->dev);
-       return 0;
 }
 
 static const struct i2c_device_id x1205_id[] = {
index cbc8b1d..783f1b8 100644 (file)
@@ -1194,7 +1194,7 @@ static const struct v4l2_subdev_ops gc0310_ops = {
        .sensor = &gc0310_sensor_ops,
 };
 
-static int gc0310_remove(struct i2c_client *client)
+static void gc0310_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct gc0310_device *dev = to_gc0310_sensor(sd);
@@ -1207,8 +1207,6 @@ static int gc0310_remove(struct i2c_client *client)
        media_entity_cleanup(&dev->sd.entity);
        v4l2_ctrl_handler_free(&dev->ctrl_handler);
        kfree(dev);
-
-       return 0;
 }
 
 static int gc0310_probe(struct i2c_client *client)
index 0e6b2e6..4d5a7e3 100644 (file)
@@ -952,7 +952,7 @@ static const struct v4l2_subdev_ops gc2235_ops = {
        .sensor = &gc2235_sensor_ops,
 };
 
-static int gc2235_remove(struct i2c_client *client)
+static void gc2235_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct gc2235_device *dev = to_gc2235_sensor(sd);
@@ -965,8 +965,6 @@ static int gc2235_remove(struct i2c_client *client)
        media_entity_cleanup(&dev->sd.entity);
        v4l2_ctrl_handler_free(&dev->ctrl_handler);
        kfree(dev);
-
-       return 0;
 }
 
 static int gc2235_probe(struct i2c_client *client)
index e046489..75d16b5 100644 (file)
@@ -910,7 +910,7 @@ free_flash:
        return err;
 }
 
-static int lm3554_remove(struct i2c_client *client)
+static void lm3554_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct lm3554 *flash = to_lm3554(sd);
@@ -926,8 +926,6 @@ static int lm3554_remove(struct i2c_client *client)
        lm3554_gpio_uninit(client);
 
        kfree(flash);
-
-       return 0;
 }
 
 static const struct dev_pm_ops lm3554_pm_ops = {
index 3c81ab7..a0e8e94 100644 (file)
@@ -1713,7 +1713,7 @@ static const struct v4l2_subdev_ops mt9m114_ops = {
        .sensor = &mt9m114_sensor_ops,
 };
 
-static int mt9m114_remove(struct i2c_client *client)
+static void mt9m114_remove(struct i2c_client *client)
 {
        struct mt9m114_device *dev;
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
@@ -1724,7 +1724,6 @@ static int mt9m114_remove(struct i2c_client *client)
        media_entity_cleanup(&dev->sd.entity);
        v4l2_ctrl_handler_free(&dev->ctrl_handler);
        kfree(dev);
-       return 0;
 }
 
 static int mt9m114_probe(struct i2c_client *client)
index 4ba99c6..8f48b23 100644 (file)
@@ -1135,7 +1135,7 @@ static const struct v4l2_subdev_ops ov2680_ops = {
        .sensor = &ov2680_sensor_ops,
 };
 
-static int ov2680_remove(struct i2c_client *client)
+static void ov2680_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2680_device *dev = to_ov2680_sensor(sd);
@@ -1148,8 +1148,6 @@ static int ov2680_remove(struct i2c_client *client)
        media_entity_cleanup(&dev->sd.entity);
        v4l2_ctrl_handler_free(&dev->ctrl_handler);
        kfree(dev);
-
-       return 0;
 }
 
 static int ov2680_probe(struct i2c_client *client)
index d5d099a..887b6f9 100644 (file)
@@ -1090,7 +1090,7 @@ static const struct v4l2_subdev_ops ov2722_ops = {
        .sensor = &ov2722_sensor_ops,
 };
 
-static int ov2722_remove(struct i2c_client *client)
+static void ov2722_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2722_device *dev = to_ov2722_sensor(sd);
@@ -1103,8 +1103,6 @@ static int ov2722_remove(struct i2c_client *client)
 
        media_entity_cleanup(&dev->sd.entity);
        kfree(dev);
-
-       return 0;
 }
 
 static int __ov2722_init_ctrl_handler(struct ov2722_device *dev)
index 6c95f57..c1cd631 100644 (file)
@@ -1877,7 +1877,7 @@ static const struct v4l2_subdev_ops ov5693_ops = {
        .pad = &ov5693_pad_ops,
 };
 
-static int ov5693_remove(struct i2c_client *client)
+static void ov5693_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov5693_device *dev = to_ov5693_sensor(sd);
@@ -1893,8 +1893,6 @@ static int ov5693_remove(struct i2c_client *client)
        media_entity_cleanup(&dev->sd.entity);
        v4l2_ctrl_handler_free(&dev->ctrl_handler);
        kfree(dev);
-
-       return 0;
 }
 
 static int ov5693_probe(struct i2c_client *client)
index 6b5abd9..99b333b 100644 (file)
@@ -407,15 +407,13 @@ static int max96712_probe(struct i2c_client *client)
        return max96712_v4l2_register(priv);
 }
 
-static int max96712_remove(struct i2c_client *client)
+static void max96712_remove(struct i2c_client *client)
 {
        struct max96712_priv *priv = i2c_get_clientdata(client);
 
        v4l2_async_unregister_subdev(&priv->sd);
 
        gpiod_set_value_cansleep(priv->gpiod_pwdn, 0);
-
-       return 0;
 }
 
 static const struct of_device_id max96712_of_table[] = {
index 7042f10..285a071 100644 (file)
@@ -340,14 +340,12 @@ static int i2c_probe(struct i2c_client *client, const struct i2c_device_id *id)
  *
  * Unregister the i2c client device as a MOST interface
  */
-static int i2c_remove(struct i2c_client *client)
+static void i2c_remove(struct i2c_client *client)
 {
        struct hdm_i2c *dev = i2c_get_clientdata(client);
 
        most_deregister_interface(&dev->most_iface);
        kfree(dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id i2c_id[] = {
index 9363c5c..4fb9b9f 100644 (file)
@@ -668,7 +668,7 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return rc;
 }
 
-static int dcon_remove(struct i2c_client *client)
+static void dcon_remove(struct i2c_client *client)
 {
        struct dcon_priv *dcon = i2c_get_clientdata(client);
 
@@ -684,8 +684,6 @@ static int dcon_remove(struct i2c_client *client)
        cancel_work_sync(&dcon->switch_source);
 
        kfree(dcon);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index ab10ca4..7cf81f6 100644 (file)
@@ -1616,11 +1616,9 @@ static int max310x_i2c_probe(struct i2c_client *client)
                             regmaps, client->irq);
 }
 
-static int max310x_i2c_remove(struct i2c_client *client)
+static void max310x_i2c_remove(struct i2c_client *client)
 {
        max310x_remove(&client->dev);
-
-       return 0;
 }
 
 static struct i2c_driver max310x_i2c_driver = {
index 259e08c..d983692 100644 (file)
@@ -1689,11 +1689,9 @@ static int sc16is7xx_i2c_probe(struct i2c_client *i2c,
        return sc16is7xx_probe(&i2c->dev, devtype, regmap, i2c->irq);
 }
 
-static int sc16is7xx_i2c_remove(struct i2c_client *client)
+static void sc16is7xx_i2c_remove(struct i2c_client *client)
 {
        sc16is7xx_remove(&client->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id sc16is7xx_i2c_id_table[] = {
index 330f494..3c9fa66 100644 (file)
@@ -289,14 +289,12 @@ static int usb3503_i2c_probe(struct i2c_client *i2c,
        return usb3503_probe(hub);
 }
 
-static int usb3503_i2c_remove(struct i2c_client *i2c)
+static void usb3503_i2c_remove(struct i2c_client *i2c)
 {
        struct usb3503 *hub;
 
        hub = i2c_get_clientdata(i2c);
        clk_disable_unprepare(hub->clk);
-
-       return 0;
 }
 
 static int usb3503_platform_probe(struct platform_device *pdev)
index f8bd93f..e5d3f20 100644 (file)
@@ -1196,7 +1196,7 @@ static void isp1301_release(struct device *dev)
 
 static struct isp1301 *the_transceiver;
 
-static int isp1301_remove(struct i2c_client *i2c)
+static void isp1301_remove(struct i2c_client *i2c)
 {
        struct isp1301  *isp;
 
@@ -1214,8 +1214,6 @@ static int isp1301_remove(struct i2c_client *i2c)
 
        put_device(&i2c->dev);
        the_transceiver = NULL;
-
-       return 0;
 }
 
 /*-------------------------------------------------------------------------*/
index ad3d57f..c2777a5 100644 (file)
@@ -120,14 +120,12 @@ static int isp1301_probe(struct i2c_client *client,
        return 0;
 }
 
-static int isp1301_remove(struct i2c_client *client)
+static void isp1301_remove(struct i2c_client *client)
 {
        struct isp1301 *isp = i2c_get_clientdata(client);
 
        usb_remove_phy(&isp->phy);
        isp1301_i2c_client = NULL;
-
-       return 0;
 }
 
 static struct i2c_driver isp1301_driver = {
index c0f0842..e205f40 100644 (file)
@@ -1541,7 +1541,7 @@ free_i2c_dummy:
        return ret;
 }
 
-static int anx7411_i2c_remove(struct i2c_client *client)
+static void anx7411_i2c_remove(struct i2c_client *client)
 {
        struct anx7411_data *plat = i2c_get_clientdata(client);
 
@@ -1565,8 +1565,6 @@ static int anx7411_i2c_remove(struct i2c_client *client)
                typec_unregister_port(plat->typec.port);
 
        anx7411_port_unregister_altmodes(plat->typec.port_amode);
-
-       return 0;
 }
 
 static const struct i2c_device_id anx7411_id[] = {
index cd47c35..2a58185 100644 (file)
@@ -245,14 +245,12 @@ err_put_fwnode:
        return ret;
 }
 
-static int hd3ss3220_remove(struct i2c_client *client)
+static void hd3ss3220_remove(struct i2c_client *client)
 {
        struct hd3ss3220 *hd3ss3220 = i2c_get_clientdata(client);
 
        typec_unregister_port(hd3ss3220->port);
        usb_role_switch_put(hd3ss3220->role_sw);
-
-       return 0;
 }
 
 static const struct of_device_id dev_ids[] = {
index 6184f53..d6495e5 100644 (file)
@@ -181,14 +181,12 @@ static int fsa4480_probe(struct i2c_client *client)
        return 0;
 }
 
-static int fsa4480_remove(struct i2c_client *client)
+static void fsa4480_remove(struct i2c_client *client)
 {
        struct fsa4480 *fsa = i2c_get_clientdata(client);
 
        typec_mux_unregister(fsa->mux);
        typec_switch_unregister(fsa->sw);
-
-       return 0;
 }
 
 static const struct i2c_device_id fsa4480_table[] = {
index 6ce9f28..1cd388b 100644 (file)
@@ -160,13 +160,12 @@ static int pi3usb30532_probe(struct i2c_client *client)
        return 0;
 }
 
-static int pi3usb30532_remove(struct i2c_client *client)
+static void pi3usb30532_remove(struct i2c_client *client)
 {
        struct pi3usb30532 *pi = i2c_get_clientdata(client);
 
        typec_mux_unregister(pi->mux);
        typec_switch_unregister(pi->sw);
-       return 0;
 }
 
 static const struct i2c_device_id pi3usb30532_table[] = {
index f1b698e..ea8b700 100644 (file)
@@ -930,14 +930,12 @@ err_fwnode_put:
        return ret;
 }
 
-static int rt1719_remove(struct i2c_client *i2c)
+static void rt1719_remove(struct i2c_client *i2c)
 {
        struct rt1719_data *data = i2c_get_clientdata(i2c);
 
        typec_unregister_port(data->port);
        usb_role_switch_put(data->role_sw);
-
-       return 0;
 }
 
 static const struct of_device_id __maybe_unused rt1719_device_table[] = {
index e7745d1..8638f1d 100644 (file)
@@ -801,7 +801,7 @@ fwnode_put:
        return ret;
 }
 
-static int stusb160x_remove(struct i2c_client *client)
+static void stusb160x_remove(struct i2c_client *client)
 {
        struct stusb160x *chip = i2c_get_clientdata(client);
 
@@ -823,8 +823,6 @@ static int stusb160x_remove(struct i2c_client *client)
 
        if (chip->main_supply)
                regulator_disable(chip->main_supply);
-
-       return 0;
 }
 
 static int __maybe_unused stusb160x_suspend(struct device *dev)
index 96c55ea..5e9348f 100644 (file)
@@ -1771,7 +1771,7 @@ destroy_workqueue:
        return ret;
 }
 
-static int fusb302_remove(struct i2c_client *client)
+static void fusb302_remove(struct i2c_client *client)
 {
        struct fusb302_chip *chip = i2c_get_clientdata(client);
 
@@ -1783,8 +1783,6 @@ static int fusb302_remove(struct i2c_client *client)
        fwnode_handle_put(chip->tcpc_dev.fwnode);
        destroy_workqueue(chip->wq);
        fusb302_debugfs_exit(chip);
-
-       return 0;
 }
 
 static int fusb302_pm_suspend(struct device *dev)
index 8127847..f00810d 100644 (file)
@@ -868,7 +868,7 @@ static int tcpci_probe(struct i2c_client *client,
        return 0;
 }
 
-static int tcpci_remove(struct i2c_client *client)
+static void tcpci_remove(struct i2c_client *client)
 {
        struct tcpci_chip *chip = i2c_get_clientdata(client);
        int err;
@@ -879,8 +879,6 @@ static int tcpci_remove(struct i2c_client *client)
                dev_warn(&client->dev, "Failed to disable irqs (%pe)\n", ERR_PTR(err));
 
        tcpci_unregister_port(chip->tcpci);
-
-       return 0;
 }
 
 static const struct i2c_device_id tcpci_id[] = {
index 4b6705f..03f89e6 100644 (file)
@@ -492,14 +492,12 @@ unreg_port:
        return ret;
 }
 
-static int max_tcpci_remove(struct i2c_client *client)
+static void max_tcpci_remove(struct i2c_client *client)
 {
        struct max_tcpci_chip *chip = i2c_get_clientdata(client);
 
        if (!IS_ERR_OR_NULL(chip->tcpci))
                tcpci_unregister_port(chip->tcpci);
-
-       return 0;
 }
 
 static const struct i2c_device_id max_tcpci_id[] = {
index 3291ca4..c132771 100644 (file)
@@ -263,12 +263,11 @@ static int rt1711h_probe(struct i2c_client *client,
        return 0;
 }
 
-static int rt1711h_remove(struct i2c_client *client)
+static void rt1711h_remove(struct i2c_client *client)
 {
        struct rt1711h_chip *chip = i2c_get_clientdata(client);
 
        tcpci_unregister_port(chip->tcpci);
-       return 0;
 }
 
 static const struct i2c_device_id rt1711h_id[] = {
index dfbba5a..b637e8b 100644 (file)
@@ -857,15 +857,13 @@ err_clear_mask:
        return ret;
 }
 
-static int tps6598x_remove(struct i2c_client *client)
+static void tps6598x_remove(struct i2c_client *client)
 {
        struct tps6598x *tps = i2c_get_clientdata(client);
 
        tps6598x_disconnect(tps, 0);
        typec_unregister_port(tps->port);
        usb_role_switch_put(tps->role_sw);
-
-       return 0;
 }
 
 static const struct of_device_id tps6598x_of_match[] = {
index 5c0bf48..3497563 100644 (file)
@@ -1403,7 +1403,7 @@ out_ucsi_destroy:
        return status;
 }
 
-static int ucsi_ccg_remove(struct i2c_client *client)
+static void ucsi_ccg_remove(struct i2c_client *client)
 {
        struct ucsi_ccg *uc = i2c_get_clientdata(client);
 
@@ -1413,8 +1413,6 @@ static int ucsi_ccg_remove(struct i2c_client *client)
        ucsi_unregister(uc->ucsi);
        ucsi_destroy(uc->ucsi);
        free_irq(uc->irq, uc);
-
-       return 0;
 }
 
 static const struct i2c_device_id ucsi_ccg_device_id[] = {
index 061551d..16289ff 100644 (file)
@@ -688,7 +688,7 @@ destroy:
        return ret;
 }
 
-static int ucsi_stm32g0_remove(struct i2c_client *client)
+static void ucsi_stm32g0_remove(struct i2c_client *client)
 {
        struct ucsi_stm32g0 *g0 = i2c_get_clientdata(client);
 
@@ -697,8 +697,6 @@ static int ucsi_stm32g0_remove(struct i2c_client *client)
        if (g0->fw_name)
                i2c_unregister_device(g0->i2c_bl);
        ucsi_destroy(g0->ucsi);
-
-       return 0;
 }
 
 static int ucsi_stm32g0_suspend(struct device *dev)
index e63509f..3cc7a15 100644 (file)
@@ -399,7 +399,7 @@ err_put_connector:
        return ret;
 }
 
-static int wusb3801_remove(struct i2c_client *client)
+static void wusb3801_remove(struct i2c_client *client)
 {
        struct wusb3801 *wusb3801 = i2c_get_clientdata(client);
 
@@ -411,8 +411,6 @@ static int wusb3801_remove(struct i2c_client *client)
 
        if (wusb3801->vbus_on)
                regulator_disable(wusb3801->vbus_supply);
-
-       return 0;
 }
 
 static const struct of_device_id wusb3801_of_match[] = {
index 8ec1942..b0fe022 100644 (file)
@@ -753,7 +753,7 @@ out:
        return ret;
 }
 
-static int adp8860_remove(struct i2c_client *client)
+static void adp8860_remove(struct i2c_client *client)
 {
        struct adp8860_bl *data = i2c_get_clientdata(client);
 
@@ -765,8 +765,6 @@ static int adp8860_remove(struct i2c_client *client)
        if (data->en_ambl_sens)
                sysfs_remove_group(&data->bl->dev.kobj,
                        &adp8860_bl_attr_group);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 8b5213a..5becace 100644 (file)
@@ -925,7 +925,7 @@ out:
        return ret;
 }
 
-static int adp8870_remove(struct i2c_client *client)
+static void adp8870_remove(struct i2c_client *client)
 {
        struct adp8870_bl *data = i2c_get_clientdata(client);
 
@@ -937,8 +937,6 @@ static int adp8870_remove(struct i2c_client *client)
        if (data->pdata->en_ambl_sens)
                sysfs_remove_group(&data->bl->dev.kobj,
                        &adp8870_bl_attr_group);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 7b1c0a0..060c0ee 100644 (file)
@@ -362,7 +362,7 @@ probe_err:
        return ret;
 }
 
-static int arcxcnn_remove(struct i2c_client *cl)
+static void arcxcnn_remove(struct i2c_client *cl)
 {
        struct arcxcnn *lp = i2c_get_clientdata(cl);
 
@@ -376,8 +376,6 @@ static int arcxcnn_remove(struct i2c_client *cl)
        lp->bl->props.brightness = 0;
 
        backlight_update_status(lp->bl);
-
-       return 0;
 }
 
 static const struct of_device_id arcxcnn_dt_ids[] = {
index 515184f..a506872 100644 (file)
@@ -175,14 +175,12 @@ static int bd6107_probe(struct i2c_client *client,
        return 0;
 }
 
-static int bd6107_remove(struct i2c_client *client)
+static void bd6107_remove(struct i2c_client *client)
 {
        struct backlight_device *backlight = i2c_get_clientdata(client);
 
        backlight->props.brightness = 0;
        backlight_update_status(backlight);
-
-       return 0;
 }
 
 static const struct i2c_device_id bd6107_ids[] = {
index 1d17c43..475f356 100644 (file)
@@ -579,7 +579,7 @@ static int lm3630a_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lm3630a_remove(struct i2c_client *client)
+static void lm3630a_remove(struct i2c_client *client)
 {
        int rval;
        struct lm3630a_chip *pchip = i2c_get_clientdata(client);
@@ -596,7 +596,6 @@ static int lm3630a_remove(struct i2c_client *client)
                free_irq(pchip->irq, pchip);
                destroy_workqueue(pchip->irqthread);
        }
-       return 0;
 }
 
 static const struct i2c_device_id lm3630a_id[] = {
index 48c0415..6580911 100644 (file)
@@ -390,7 +390,7 @@ err_out:
        return ret;
 }
 
-static int lm3639_remove(struct i2c_client *client)
+static void lm3639_remove(struct i2c_client *client)
 {
        struct lm3639_chip_data *pchip = i2c_get_clientdata(client);
 
@@ -400,7 +400,6 @@ static int lm3639_remove(struct i2c_client *client)
        led_classdev_unregister(&pchip->cdev_flash);
        if (pchip->bled)
                device_remove_file(&(pchip->bled->dev), &dev_attr_bled_mode);
-       return 0;
 }
 
 static const struct i2c_device_id lm3639_id[] = {
index fc02c5c..bd0bdea 100644 (file)
@@ -534,7 +534,7 @@ disable_supply:
        return ret;
 }
 
-static int lp855x_remove(struct i2c_client *cl)
+static void lp855x_remove(struct i2c_client *cl)
 {
        struct lp855x *lp = i2c_get_clientdata(cl);
 
@@ -545,8 +545,6 @@ static int lp855x_remove(struct i2c_client *cl)
        if (lp->supply)
                regulator_disable(lp->supply);
        sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group);
-
-       return 0;
 }
 
 static const struct of_device_id lp855x_dt_ids[] = {
index 1842ae9..767b800 100644 (file)
@@ -124,14 +124,12 @@ static int lv5207lp_probe(struct i2c_client *client,
        return 0;
 }
 
-static int lv5207lp_remove(struct i2c_client *client)
+static void lv5207lp_remove(struct i2c_client *client)
 {
        struct backlight_device *backlight = i2c_get_clientdata(client);
 
        backlight->props.brightness = 0;
        backlight_update_status(backlight);
-
-       return 0;
 }
 
 static const struct i2c_device_id lv5207lp_ids[] = {
index 6df6fcd..f55b3d6 100644 (file)
@@ -121,12 +121,11 @@ err_reg:
        return ret;
 }
 
-static int tosa_bl_remove(struct i2c_client *client)
+static void tosa_bl_remove(struct i2c_client *client)
 {
        struct tosa_bl_data *data = i2c_get_clientdata(client);
 
        data->bl = NULL;
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 9a98c4a..f2e0295 100644 (file)
@@ -1276,11 +1276,10 @@ ERROR0:;
        return err;
 }
 
-static int maven_remove(struct i2c_client *client)
+static void maven_remove(struct i2c_client *client)
 {
        maven_shutdown_client(client);
        kfree(i2c_get_clientdata(client));
-       return 0;
 }
 
 static const struct i2c_device_id maven_id[] = {
index 52e4ed9..5c891aa 100644 (file)
@@ -817,7 +817,7 @@ fb_alloc_error:
        return ret;
 }
 
-static int ssd1307fb_remove(struct i2c_client *client)
+static void ssd1307fb_remove(struct i2c_client *client)
 {
        struct fb_info *info = i2c_get_clientdata(client);
        struct ssd1307fb_par *par = info->par;
@@ -836,8 +836,6 @@ static int ssd1307fb_remove(struct i2c_client *client)
        fb_deferred_io_cleanup(info);
        __free_pages(__va(info->fix.smem_start), get_order(info->fix.smem_len));
        framebuffer_release(info);
-
-       return 0;
 }
 
 static const struct i2c_device_id ssd1307fb_i2c_id[] = {
index 6c962e8..62c4461 100644 (file)
@@ -525,7 +525,7 @@ exit:
        return err;
 }
 
-static int ds2482_remove(struct i2c_client *client)
+static void ds2482_remove(struct i2c_client *client)
 {
        struct ds2482_data   *data = i2c_get_clientdata(client);
        int idx;
@@ -538,7 +538,6 @@ static int ds2482_remove(struct i2c_client *client)
 
        /* Free the memory */
        kfree(data);
-       return 0;
 }
 
 /*
index c5a9b82..d0e8887 100644 (file)
@@ -708,13 +708,11 @@ static int ziirave_wdt_probe(struct i2c_client *client,
        return ret;
 }
 
-static int ziirave_wdt_remove(struct i2c_client *client)
+static void ziirave_wdt_remove(struct i2c_client *client)
 {
        struct ziirave_wdt_data *w_priv = i2c_get_clientdata(client);
 
        watchdog_unregister_device(&w_priv->wdd);
-
-       return 0;
 }
 
 static const struct i2c_device_id ziirave_wdt_id[] = {
index 8eab501..f7c49bb 100644 (file)
@@ -273,7 +273,7 @@ struct i2c_driver {
 
        /* Standard driver model interfaces */
        int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);
-       int (*remove)(struct i2c_client *client);
+       void (*remove)(struct i2c_client *client);
 
        /* New driver model interface to aid the seamless removal of the
         * current probe()'s, more commonly unused than used second parameter.
index 4eb53e0..96c1a14 100644 (file)
@@ -22,7 +22,7 @@ struct pca953x_platform_data {
        int             (*setup)(struct i2c_client *client,
                                unsigned gpio, unsigned ngpio,
                                void *context);
-       int             (*teardown)(struct i2c_client *client,
+       void            (*teardown)(struct i2c_client *client,
                                unsigned gpio, unsigned ngpio,
                                void *context);
        const char      *const *names;
index 1abee84..2d0f904 100644 (file)
@@ -1029,7 +1029,7 @@ static int onyx_i2c_probe(struct i2c_client *client,
        return -ENODEV;
 }
 
-static int onyx_i2c_remove(struct i2c_client *client)
+static void onyx_i2c_remove(struct i2c_client *client)
 {
        struct onyx *onyx = i2c_get_clientdata(client);
 
@@ -1037,7 +1037,6 @@ static int onyx_i2c_remove(struct i2c_client *client)
        of_node_put(onyx->codec.node);
        kfree(onyx->codec_info);
        kfree(onyx);
-       return 0;
 }
 
 static const struct i2c_device_id onyx_i2c_id[] = {
index ab19a37..ab89475 100644 (file)
@@ -912,7 +912,7 @@ static int tas_i2c_probe(struct i2c_client *client,
        return -EINVAL;
 }
 
-static int tas_i2c_remove(struct i2c_client *client)
+static void tas_i2c_remove(struct i2c_client *client)
 {
        struct tas *tas = i2c_get_clientdata(client);
        u8 tmp = TAS_ACR_ANALOG_PDOWN;
@@ -925,7 +925,6 @@ static int tas_i2c_remove(struct i2c_client *client)
 
        mutex_destroy(&tas->mtx);
        kfree(tas);
-       return 0;
 }
 
 static const struct i2c_device_id tas_i2c_id[] = {
index 5baacfd..5a6252d 100644 (file)
@@ -33,11 +33,9 @@ static int cs35l41_hda_i2c_probe(struct i2c_client *clt, const struct i2c_device
                                 devm_regmap_init_i2c(clt, &cs35l41_regmap_i2c));
 }
 
-static int cs35l41_hda_i2c_remove(struct i2c_client *clt)
+static void cs35l41_hda_i2c_remove(struct i2c_client *clt)
 {
        cs35l41_hda_remove(&clt->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id cs35l41_hda_i2c_id[] = {
index 6e5daae..80e5108 100644 (file)
@@ -71,14 +71,12 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
        return 0;
 }
 
-static int keywest_remove(struct i2c_client *client)
+static void keywest_remove(struct i2c_client *client)
 {
        if (! keywest_ctx)
-               return 0;
+               return;
        if (client == keywest_ctx->client)
                keywest_ctx->client = NULL;
-
-       return 0;
 }
 
 
index 0683caf..0cefff4 100644 (file)
@@ -30,10 +30,9 @@ static int adau1761_i2c_probe(struct i2c_client *client)
                id->driver_data, NULL);
 }
 
-static int adau1761_i2c_remove(struct i2c_client *client)
+static void adau1761_i2c_remove(struct i2c_client *client)
 {
        adau17x1_remove(&client->dev);
-       return 0;
 }
 
 static const struct i2c_device_id adau1761_i2c_ids[] = {
index e046de0..39021b8 100644 (file)
@@ -30,10 +30,9 @@ static int adau1781_i2c_probe(struct i2c_client *client)
                id->driver_data, NULL);
 }
 
-static int adau1781_i2c_remove(struct i2c_client *client)
+static void adau1781_i2c_remove(struct i2c_client *client)
 {
        adau17x1_remove(&client->dev);
-       return 0;
 }
 
 static const struct i2c_device_id adau1781_i2c_ids[] = {
index 1ed004b..573389e 100644 (file)
@@ -580,11 +580,9 @@ static int ak4375_i2c_probe(struct i2c_client *i2c)
        return 0;
 }
 
-static int ak4375_i2c_remove(struct i2c_client *i2c)
+static void ak4375_i2c_remove(struct i2c_client *i2c)
 {
        pm_runtime_disable(&i2c->dev);
-
-       return 0;
 }
 
 static const struct of_device_id ak4375_of_match[] = {
index ea33cc8..f2d519e 100644 (file)
@@ -824,11 +824,9 @@ static int ak4458_i2c_probe(struct i2c_client *i2c)
        return 0;
 }
 
-static int ak4458_i2c_remove(struct i2c_client *i2c)
+static void ak4458_i2c_remove(struct i2c_client *i2c)
 {
        pm_runtime_disable(&i2c->dev);
-
-       return 0;
 }
 
 static const struct of_device_id ak4458_of_match[] = {
index 88851e9..0d3ee19 100644 (file)
@@ -604,7 +604,7 @@ err_out:
        return ret;
 }
 
-static int ak4641_i2c_remove(struct i2c_client *i2c)
+static void ak4641_i2c_remove(struct i2c_client *i2c)
 {
        struct ak4641_platform_data *pdata = i2c->dev.platform_data;
 
@@ -616,8 +616,6 @@ static int ak4641_i2c_remove(struct i2c_client *i2c)
                if (gpio_is_valid(pdata->gpio_npdn))
                        gpio_free(pdata->gpio_npdn);
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id ak4641_i2c_id[] = {
index 887d2c0..60abcff 100644 (file)
@@ -479,11 +479,9 @@ static int ak5558_i2c_probe(struct i2c_client *i2c)
        return 0;
 }
 
-static int ak5558_i2c_remove(struct i2c_client *i2c)
+static void ak5558_i2c_remove(struct i2c_client *i2c)
 {
        pm_runtime_disable(&i2c->dev);
-
-       return 0;
 }
 
 static const struct of_device_id ak5558_i2c_dt_ids[] __maybe_unused = {
index 8ff6f66..dc7a58d 100644 (file)
@@ -497,14 +497,12 @@ err_supplies:
        return ret;
 }
 
-static int cs35l32_i2c_remove(struct i2c_client *i2c_client)
+static void cs35l32_i2c_remove(struct i2c_client *i2c_client)
 {
        struct cs35l32_private *cs35l32 = i2c_get_clientdata(i2c_client);
 
        /* Hold down reset */
        gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 082025f..15e7916 100644 (file)
@@ -1250,7 +1250,7 @@ err_enable:
        return ret;
 }
 
-static int cs35l33_i2c_remove(struct i2c_client *client)
+static void cs35l33_i2c_remove(struct i2c_client *client)
 {
        struct cs35l33_private *cs35l33 = i2c_get_clientdata(client);
 
@@ -1259,8 +1259,6 @@ static int cs35l33_i2c_remove(struct i2c_client *client)
        pm_runtime_disable(&client->dev);
        regulator_bulk_disable(cs35l33->num_core_supplies,
                cs35l33->core_supplies);
-
-       return 0;
 }
 
 static const struct of_device_id cs35l33_of_match[] = {
index 472ac98..b3f9802 100644 (file)
@@ -1128,7 +1128,7 @@ err_regulator:
        return ret;
 }
 
-static int cs35l34_i2c_remove(struct i2c_client *client)
+static void cs35l34_i2c_remove(struct i2c_client *client)
 {
        struct cs35l34_private *cs35l34 = i2c_get_clientdata(client);
 
@@ -1137,8 +1137,6 @@ static int cs35l34_i2c_remove(struct i2c_client *client)
        pm_runtime_disable(&client->dev);
        regulator_bulk_disable(cs35l34->num_core_supplies,
                cs35l34->core_supplies);
-
-       return 0;
 }
 
 static int __maybe_unused cs35l34_runtime_resume(struct device *dev)
index 714a759..947a440 100644 (file)
@@ -1627,14 +1627,12 @@ err:
        return ret;
 }
 
-static int cs35l35_i2c_remove(struct i2c_client *i2c_client)
+static void cs35l35_i2c_remove(struct i2c_client *i2c_client)
 {
        struct cs35l35_private *cs35l35 = i2c_get_clientdata(i2c_client);
 
        regulator_bulk_disable(cs35l35->num_supplies, cs35l35->supplies);
        gpiod_set_value_cansleep(cs35l35->reset_gpio, 0);
-
-       return 0;
 }
 
 static const struct of_device_id cs35l35_of_match[] = {
index 4dc13e6..31ae752 100644 (file)
@@ -1910,7 +1910,7 @@ err_disable_regs:
        return ret;
 }
 
-static int cs35l36_i2c_remove(struct i2c_client *client)
+static void cs35l36_i2c_remove(struct i2c_client *client)
 {
        struct cs35l36_private *cs35l36 = i2c_get_clientdata(client);
 
@@ -1924,8 +1924,6 @@ static int cs35l36_i2c_remove(struct i2c_client *client)
                gpiod_set_value_cansleep(cs35l36->reset_gpio, 0);
 
        regulator_bulk_disable(cs35l36->num_supplies, cs35l36->supplies);
-
-       return 0;
 }
 static const struct of_device_id cs35l36_of_match[] = {
        {.compatible = "cirrus,cs35l36"},
index 37c703c..3676b59 100644 (file)
@@ -56,13 +56,11 @@ static int cs35l41_i2c_probe(struct i2c_client *client)
        return cs35l41_probe(cs35l41, hw_cfg);
 }
 
-static int cs35l41_i2c_remove(struct i2c_client *client)
+static void cs35l41_i2c_remove(struct i2c_client *client)
 {
        struct cs35l41_private *cs35l41 = i2c_get_clientdata(client);
 
        cs35l41_remove(cs35l41);
-
-       return 0;
 }
 
 #ifdef CONFIG_OF
index 06c2ddf..39d2864 100644 (file)
@@ -36,13 +36,11 @@ static int cs35l45_i2c_probe(struct i2c_client *client)
        return cs35l45_probe(cs35l45);
 }
 
-static int cs35l45_i2c_remove(struct i2c_client *client)
+static void cs35l45_i2c_remove(struct i2c_client *client)
 {
        struct cs35l45_private *cs35l45 = i2c_get_clientdata(client);
 
        cs35l45_remove(cs35l45);
-
-       return 0;
 }
 
 static const struct of_device_id cs35l45_of_match[] = {
index b49a3cf..dee1a66 100644 (file)
@@ -850,7 +850,7 @@ fail_shutdown:
        return ret;
 }
 
-static int cs4234_i2c_remove(struct i2c_client *i2c_client)
+static void cs4234_i2c_remove(struct i2c_client *i2c_client)
 {
        struct cs4234 *cs4234 = i2c_get_clientdata(i2c_client);
        struct device *dev = &i2c_client->dev;
@@ -858,8 +858,6 @@ static int cs4234_i2c_remove(struct i2c_client *i2c_client)
        snd_soc_unregister_component(dev);
        pm_runtime_disable(dev);
        cs4234_shutdown(cs4234);
-
-       return 0;
 }
 
 static int __maybe_unused cs4234_runtime_resume(struct device *dev)
index 76c1980..3573363 100644 (file)
@@ -623,14 +623,12 @@ static int cs4265_i2c_probe(struct i2c_client *i2c_client)
                        ARRAY_SIZE(cs4265_dai));
 }
 
-static int cs4265_i2c_remove(struct i2c_client *i2c)
+static void cs4265_i2c_remove(struct i2c_client *i2c)
 {
        struct cs4265_private *cs4265 = i2c_get_clientdata(i2c);
 
        if (cs4265->reset_gpio)
                gpiod_set_value_cansleep(cs4265->reset_gpio, 0);
-
-       return 0;
 }
 
 static const struct of_device_id cs4265_of_match[] = {
index ba67e43..1b640d8 100644 (file)
@@ -650,13 +650,11 @@ static const struct regmap_config cs4270_regmap = {
  * This function puts the chip into low power mode when the i2c device
  * is removed.
  */
-static int cs4270_i2c_remove(struct i2c_client *i2c_client)
+static void cs4270_i2c_remove(struct i2c_client *i2c_client)
 {
        struct cs4270_private *cs4270 = i2c_get_clientdata(i2c_client);
 
        gpiod_set_value_cansleep(cs4270->reset_gpio, 0);
-
-       return 0;
 }
 
 /**
index daafd42..53274ea 100644 (file)
@@ -2341,7 +2341,7 @@ err_disable_noreset:
        return ret;
 }
 
-static int cs42l42_i2c_remove(struct i2c_client *i2c_client)
+static void cs42l42_i2c_remove(struct i2c_client *i2c_client)
 {
        struct cs42l42_private *cs42l42 = i2c_get_clientdata(i2c_client);
 
@@ -2358,8 +2358,6 @@ static int cs42l42_i2c_remove(struct i2c_client *i2c_client)
 
        gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);
        regulator_bulk_disable(ARRAY_SIZE(cs42l42->supplies), cs42l42->supplies);
-
-       return 0;
 }
 
 static const struct dev_pm_ops cs42l42_pm_ops = {
index 3613fb1..8523833 100644 (file)
@@ -28,11 +28,9 @@ static int cs42l51_i2c_probe(struct i2c_client *i2c)
        return cs42l51_probe(&i2c->dev, devm_regmap_init_i2c(i2c, &config));
 }
 
-static int cs42l51_i2c_remove(struct i2c_client *i2c)
+static void cs42l51_i2c_remove(struct i2c_client *i2c)
 {
        cs42l51_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct dev_pm_ops cs42l51_pm_ops = {
index 03e2540..2606668 100644 (file)
@@ -1320,13 +1320,12 @@ err_enable:
        return ret;
 }
 
-static int cs42l56_i2c_remove(struct i2c_client *client)
+static void cs42l56_i2c_remove(struct i2c_client *client)
 {
        struct cs42l56_private *cs42l56 = i2c_get_clientdata(client);
 
        regulator_bulk_disable(ARRAY_SIZE(cs42l56->supplies),
                               cs42l56->supplies);
-       return 0;
 }
 
 static const struct of_device_id cs42l56_of_match[] = {
index cb06a06..bd80e9f 100644 (file)
@@ -30,11 +30,9 @@ static int cs42xx8_i2c_probe(struct i2c_client *i2c)
        return 0;
 }
 
-static int cs42xx8_i2c_remove(struct i2c_client *i2c)
+static void cs42xx8_i2c_remove(struct i2c_client *i2c)
 {
        pm_runtime_disable(&i2c->dev);
-
-       return 0;
 }
 
 static struct i2c_device_id cs42xx8_i2c_id[] = {
index ca4d47c..411b951 100644 (file)
@@ -2583,7 +2583,7 @@ err_supplies:
        return ret;
 }
 
-static int cs43130_i2c_remove(struct i2c_client *client)
+static void cs43130_i2c_remove(struct i2c_client *client)
 {
        struct cs43130_private *cs43130 = i2c_get_clientdata(client);
 
@@ -2610,8 +2610,6 @@ static int cs43130_i2c_remove(struct i2c_client *client)
 
        pm_runtime_disable(&client->dev);
        regulator_bulk_disable(CS43130_NUM_SUPPLIES, cs43130->supplies);
-
-       return 0;
 }
 
 static int __maybe_unused cs43130_runtime_suspend(struct device *dev)
index f7c5c2f..ba94ffd 100644 (file)
@@ -305,14 +305,12 @@ static int cs4349_i2c_probe(struct i2c_client *client)
                &cs4349_dai, 1);
 }
 
-static int cs4349_i2c_remove(struct i2c_client *client)
+static void cs4349_i2c_remove(struct i2c_client *client)
 {
        struct cs4349_private *cs4349 = i2c_get_clientdata(client);
 
        /* Hold down reset */
        gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 8796d8e..69db001 100644 (file)
@@ -1043,7 +1043,7 @@ error_supplies:
        return ret;
 }
 
-static int cs53l30_i2c_remove(struct i2c_client *client)
+static void cs53l30_i2c_remove(struct i2c_client *client)
 {
        struct cs53l30_private *cs53l30 = i2c_get_clientdata(client);
 
@@ -1052,8 +1052,6 @@ static int cs53l30_i2c_remove(struct i2c_client *client)
 
        regulator_bulk_disable(ARRAY_SIZE(cs53l30->supplies),
                               cs53l30->supplies);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index b6667e8..5deceaa 100644 (file)
@@ -1673,10 +1673,9 @@ static int cx2072x_i2c_probe(struct i2c_client *i2c)
        return 0;
 }
 
-static int cx2072x_i2c_remove(struct i2c_client *i2c)
+static void cx2072x_i2c_remove(struct i2c_client *i2c)
 {
        pm_runtime_disable(&i2c->dev);
-       return 0;
 }
 
 static const struct i2c_device_id cx2072x_i2c_id[] = {
index 142083b..06ed2a9 100644 (file)
@@ -2615,11 +2615,9 @@ static void max98090_i2c_shutdown(struct i2c_client *i2c)
        msleep(40);
 }
 
-static int max98090_i2c_remove(struct i2c_client *client)
+static void max98090_i2c_remove(struct i2c_client *client)
 {
        max98090_i2c_shutdown(client);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 771b3dc..9611ab1 100644 (file)
@@ -701,14 +701,13 @@ err_regulator:
        return ret;
 }
 
-static int max9860_remove(struct i2c_client *i2c)
+static void max9860_remove(struct i2c_client *i2c)
 {
        struct device *dev = &i2c->dev;
        struct max9860_priv *max9860 = dev_get_drvdata(dev);
 
        pm_runtime_disable(dev);
        regulator_disable(max9860->dvddio);
-       return 0;
 }
 
 static const struct i2c_device_id max9860_i2c_id[] = {
index 9cce7c0..331d3e1 100644 (file)
@@ -934,15 +934,13 @@ static int max98927_i2c_probe(struct i2c_client *i2c)
        return ret;
 }
 
-static int max98927_i2c_remove(struct i2c_client *i2c)
+static void max98927_i2c_remove(struct i2c_client *i2c)
 {
        struct max98927_priv *max98927 = i2c_get_clientdata(i2c);
 
        if (max98927->reset_gpio) {
                gpiod_set_value_cansleep(max98927->reset_gpio, 1);
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id max98927_i2c_id[] = {
index ba11555..4971cd0 100644 (file)
@@ -516,14 +516,13 @@ probe_fail:
        return ret;
 }
 
-static int mt6660_i2c_remove(struct i2c_client *client)
+static void mt6660_i2c_remove(struct i2c_client *client)
 {
        struct mt6660_chip *chip = i2c_get_clientdata(client);
 
        pm_runtime_disable(chip->dev);
        pm_runtime_set_suspended(chip->dev);
        mutex_destroy(&chip->io_lock);
-       return 0;
 }
 
 static int __maybe_unused mt6660_i2c_runtime_suspend(struct device *dev)
index 8213273..1b63ff5 100644 (file)
@@ -2675,10 +2675,8 @@ static int nau8825_i2c_probe(struct i2c_client *i2c)
                &nau8825_dai, 1);
 }
 
-static int nau8825_i2c_remove(struct i2c_client *client)
-{
-       return 0;
-}
+static void nau8825_i2c_remove(struct i2c_client *client)
+{}
 
 static const struct i2c_device_id nau8825_i2c_ids[] = {
        { "nau8825", 0 },
index 1d2f748..fafe0dc 100644 (file)
@@ -27,11 +27,9 @@ static int pcm1789_i2c_probe(struct i2c_client *client)
        return pcm1789_common_init(&client->dev, regmap);
 }
 
-static int pcm1789_i2c_remove(struct i2c_client *client)
+static void pcm1789_i2c_remove(struct i2c_client *client)
 {
        pcm1789_common_exit(&client->dev);
-
-       return 0;
 }
 
 #ifdef CONFIG_OF
index c0fa0dc..a0eec82 100644 (file)
@@ -26,11 +26,9 @@ static int pcm3168a_i2c_probe(struct i2c_client *i2c)
        return pcm3168a_probe(&i2c->dev, regmap);
 }
 
-static int pcm3168a_i2c_remove(struct i2c_client *i2c)
+static void pcm3168a_i2c_remove(struct i2c_client *i2c)
 {
        pcm3168a_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id pcm3168a_i2c_id[] = {
index 81754e1..9dfbbe8 100644 (file)
@@ -29,10 +29,9 @@ static int pcm512x_i2c_probe(struct i2c_client *i2c)
        return pcm512x_probe(&i2c->dev, regmap);
 }
 
-static int pcm512x_i2c_remove(struct i2c_client *i2c)
+static void pcm512x_i2c_remove(struct i2c_client *i2c)
 {
        pcm512x_remove(&i2c->dev);
-       return 0;
 }
 
 static const struct i2c_device_id pcm512x_i2c_id[] = {
index f2c50b1..4667bf7 100644 (file)
@@ -1204,14 +1204,12 @@ static int rt274_i2c_probe(struct i2c_client *i2c)
        return ret;
 }
 
-static int rt274_i2c_remove(struct i2c_client *i2c)
+static void rt274_i2c_remove(struct i2c_client *i2c)
 {
        struct rt274_priv *rt274 = i2c_get_clientdata(i2c);
 
        if (i2c->irq)
                free_irq(i2c->irq, rt274);
-
-       return 0;
 }
 
 
index c4f7c4c..ceb5664 100644 (file)
@@ -1249,14 +1249,12 @@ static int rt286_i2c_probe(struct i2c_client *i2c)
        return ret;
 }
 
-static int rt286_i2c_remove(struct i2c_client *i2c)
+static void rt286_i2c_remove(struct i2c_client *i2c)
 {
        struct rt286_priv *rt286 = i2c_get_clientdata(i2c);
 
        if (i2c->irq)
                free_irq(i2c->irq, rt286);
-
-       return 0;
 }
 
 
index b0b53d4..a2ce52d 100644 (file)
@@ -1290,14 +1290,12 @@ static int rt298_i2c_probe(struct i2c_client *i2c)
        return ret;
 }
 
-static int rt298_i2c_remove(struct i2c_client *i2c)
+static void rt298_i2c_remove(struct i2c_client *i2c)
 {
        struct rt298_priv *rt298 = i2c_get_clientdata(i2c);
 
        if (i2c->irq)
                free_irq(i2c->irq, rt298);
-
-       return 0;
 }
 
 
index 970d6c4..948abde 100644 (file)
@@ -1388,10 +1388,8 @@ static int rt5616_i2c_probe(struct i2c_client *i2c)
                                      rt5616_dai, ARRAY_SIZE(rt5616_dai));
 }
 
-static int rt5616_i2c_remove(struct i2c_client *i2c)
-{
-       return 0;
-}
+static void rt5616_i2c_remove(struct i2c_client *i2c)
+{}
 
 static void rt5616_i2c_shutdown(struct i2c_client *client)
 {
index 957f6b1..55c2324 100644 (file)
@@ -1720,10 +1720,8 @@ static int rt5631_i2c_probe(struct i2c_client *i2c)
        return ret;
 }
 
-static int rt5631_i2c_remove(struct i2c_client *client)
-{
-       return 0;
-}
+static void rt5631_i2c_remove(struct i2c_client *client)
+{}
 
 static struct i2c_driver rt5631_i2c_driver = {
        .driver = {
index 8635bc6..620ecbf 100644 (file)
@@ -4145,7 +4145,7 @@ err_enable:
        return ret;
 }
 
-static int rt5645_i2c_remove(struct i2c_client *i2c)
+static void rt5645_i2c_remove(struct i2c_client *i2c)
 {
        struct rt5645_priv *rt5645 = i2c_get_clientdata(i2c);
 
@@ -4162,8 +4162,6 @@ static int rt5645_i2c_remove(struct i2c_client *i2c)
        cancel_delayed_work_sync(&rt5645->rcclock_work);
 
        regulator_bulk_disable(ARRAY_SIZE(rt5645->supplies), rt5645->supplies);
-
-       return 0;
 }
 
 static void rt5645_i2c_shutdown(struct i2c_client *i2c)
index ca981b3..f73751d 100644 (file)
@@ -3710,7 +3710,7 @@ err_enable:
        return ret;
 }
 
-static int rt5663_i2c_remove(struct i2c_client *i2c)
+static void rt5663_i2c_remove(struct i2c_client *i2c)
 {
        struct rt5663_priv *rt5663 = i2c_get_clientdata(i2c);
 
@@ -3718,8 +3718,6 @@ static int rt5663_i2c_remove(struct i2c_client *i2c)
                free_irq(i2c->irq, rt5663);
 
        regulator_bulk_disable(ARRAY_SIZE(rt5663->supplies), rt5663->supplies);
-
-       return 0;
 }
 
 static void rt5663_i2c_shutdown(struct i2c_client *client)
index 60dbfa2..ebac6ca 100644 (file)
@@ -3320,11 +3320,9 @@ err:
        return ret;
 }
 
-static int rt5670_i2c_remove(struct i2c_client *i2c)
+static void rt5670_i2c_remove(struct i2c_client *i2c)
 {
        pm_runtime_disable(&i2c->dev);
-
-       return 0;
 }
 
 static struct i2c_driver rt5670_i2c_driver = {
index 31a2dd0..c26395f 100644 (file)
@@ -5693,11 +5693,9 @@ static int rt5677_i2c_probe(struct i2c_client *i2c)
                                      rt5677_dai, ARRAY_SIZE(rt5677_dai));
 }
 
-static int rt5677_i2c_remove(struct i2c_client *i2c)
+static void rt5677_i2c_remove(struct i2c_client *i2c)
 {
        rt5677_free_gpio(i2c);
-
-       return 0;
 }
 
 static struct i2c_driver rt5677_i2c_driver = {
index 3f72f60..2935c1b 100644 (file)
@@ -302,11 +302,9 @@ static void rt5682_i2c_shutdown(struct i2c_client *client)
        rt5682_reset(rt5682);
 }
 
-static int rt5682_i2c_remove(struct i2c_client *client)
+static void rt5682_i2c_remove(struct i2c_client *client)
 {
        rt5682_i2c_shutdown(client);
-
-       return 0;
 }
 
 static const struct of_device_id rt5682_of_match[] = {
index eb47e7c..ce6932a 100644 (file)
@@ -3194,11 +3194,9 @@ static void rt5682s_i2c_shutdown(struct i2c_client *client)
        rt5682s_reset(rt5682s);
 }
 
-static int rt5682s_i2c_remove(struct i2c_client *client)
+static void rt5682s_i2c_remove(struct i2c_client *client)
 {
        rt5682s_i2c_shutdown(client);
-
-       return 0;
 }
 
 static const struct of_device_id rt5682s_of_match[] = {
index da495bd..644300e 100644 (file)
@@ -572,11 +572,10 @@ static int rt9120_probe(struct i2c_client *i2c)
                                               &rt9120_dai, 1);
 }
 
-static int rt9120_remove(struct i2c_client *i2c)
+static void rt9120_remove(struct i2c_client *i2c)
 {
        pm_runtime_disable(&i2c->dev);
        pm_runtime_set_suspended(&i2c->dev);
-       return 0;
 }
 
 static int __maybe_unused rt9120_runtime_suspend(struct device *dev)
index 3fafd9f..4b2135e 100644 (file)
@@ -1790,7 +1790,7 @@ disable_regs:
        return ret;
 }
 
-static int sgtl5000_i2c_remove(struct i2c_client *client)
+static void sgtl5000_i2c_remove(struct i2c_client *client)
 {
        struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client);
 
@@ -1800,8 +1800,6 @@ static int sgtl5000_i2c_remove(struct i2c_client *client)
        clk_disable_unprepare(sgtl5000->mclk);
        regulator_bulk_disable(sgtl5000->num_supplies, sgtl5000->supplies);
        regulator_bulk_free(sgtl5000->num_supplies, sgtl5000->supplies);
-
-       return 0;
 }
 
 static void sgtl5000_i2c_shutdown(struct i2c_client *client)
index 7b2c5b5..9ed13ae 100644 (file)
@@ -1242,10 +1242,8 @@ static int sta350_i2c_probe(struct i2c_client *i2c)
        return ret;
 }
 
-static int sta350_i2c_remove(struct i2c_client *client)
-{
-       return 0;
-}
+static void sta350_i2c_remove(struct i2c_client *client)
+{}
 
 static const struct i2c_device_id sta350_i2c_id[] = {
        { "sta350", 0 },
index 8bd667d..59a4ea5 100644 (file)
@@ -736,10 +736,9 @@ static int tas2552_probe(struct i2c_client *client)
        return ret;
 }
 
-static int tas2552_i2c_remove(struct i2c_client *client)
+static void tas2552_i2c_remove(struct i2c_client *client)
 {
        pm_runtime_disable(&client->dev);
-       return 0;
 }
 
 static const struct i2c_device_id tas2552_id[] = {
index a864984..22143cc 100644 (file)
@@ -981,10 +981,8 @@ static int tas5086_i2c_probe(struct i2c_client *i2c)
        return ret;
 }
 
-static int tas5086_i2c_remove(struct i2c_client *i2c)
-{
-       return 0;
-}
+static void tas5086_i2c_remove(struct i2c_client *i2c)
+{}
 
 static struct i2c_driver tas5086_i2c_driver = {
        .driver = {
index 4e7f20d..84ec1b5 100644 (file)
@@ -884,13 +884,11 @@ disable_regs:
        return ret;
 }
 
-static int tas571x_i2c_remove(struct i2c_client *client)
+static void tas571x_i2c_remove(struct i2c_client *client)
 {
        struct tas571x_private *priv = i2c_get_clientdata(client);
 
        regulator_bulk_disable(priv->chip->num_supply_names, priv->supplies);
-
-       return 0;
 }
 
 static const struct of_device_id tas571x_of_match[] __maybe_unused = {
index b1bb614..beb4ec6 100644 (file)
@@ -522,7 +522,7 @@ static int tas5805m_i2c_probe(struct i2c_client *i2c)
        return 0;
 }
 
-static int tas5805m_i2c_remove(struct i2c_client *i2c)
+static void tas5805m_i2c_remove(struct i2c_client *i2c)
 {
        struct device *dev = &i2c->dev;
        struct tas5805m_priv *tas5805m = dev_get_drvdata(dev);
@@ -531,7 +531,6 @@ static int tas5805m_i2c_remove(struct i2c_client *i2c)
        gpiod_set_value(tas5805m->gpio_pdn_n, 0);
        usleep_range(10000, 15000);
        regulator_disable(tas5805m->pvdd);
-       return 0;
 }
 
 static const struct i2c_device_id tas5805m_i2c_id[] = {
index 63d2983..f8ff69f 100644 (file)
@@ -774,7 +774,7 @@ disable_regs:
        return ret;
 }
 
-static int tas6424_i2c_remove(struct i2c_client *client)
+static void tas6424_i2c_remove(struct i2c_client *client)
 {
        struct device *dev = &client->dev;
        struct tas6424_data *tas6424 = dev_get_drvdata(dev);
@@ -790,8 +790,6 @@ static int tas6424_i2c_remove(struct i2c_client *client)
                                     tas6424->supplies);
        if (ret < 0)
                dev_err(dev, "unable to disable supplies: %d\n", ret);
-
-       return 0;
 }
 
 static const struct i2c_device_id tas6424_i2c_ids[] = {
index 748998e..baab320 100644 (file)
@@ -1426,7 +1426,7 @@ err_unprepare_mclk:
        return ret;
 }
 
-static int __exit adc3xxx_i2c_remove(struct i2c_client *client)
+static void __exit adc3xxx_i2c_remove(struct i2c_client *client)
 {
        struct adc3xxx *adc3xxx = i2c_get_clientdata(client);
 
@@ -1434,7 +1434,6 @@ static int __exit adc3xxx_i2c_remove(struct i2c_client *client)
                clk_disable_unprepare(adc3xxx->mclk);
        adc3xxx_free_gpio(adc3xxx);
        snd_soc_unregister_component(&client->dev);
-       return 0;
 }
 
 static const struct of_device_id tlv320adc3xxx_of_match[] = {
index 0645239..d1e543c 100644 (file)
@@ -45,11 +45,9 @@ static int aic32x4_i2c_probe(struct i2c_client *i2c)
        return aic32x4_probe(&i2c->dev, regmap);
 }
 
-static int aic32x4_i2c_remove(struct i2c_client *i2c)
+static void aic32x4_i2c_remove(struct i2c_client *i2c)
 {
        aic32x4_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct i2c_device_id aic32x4_i2c_id[] = {
index 7bd9ce0..d7e94d5 100644 (file)
@@ -41,11 +41,9 @@ static int aic3x_i2c_probe(struct i2c_client *i2c)
        return aic3x_probe(&i2c->dev, regmap, id->driver_data);
 }
 
-static int aic3x_i2c_remove(struct i2c_client *i2c)
+static void aic3x_i2c_remove(struct i2c_client *i2c)
 {
        aic3x_remove(&i2c->dev);
-
-       return 0;
 }
 
 static const struct of_device_id aic3x_of_id[] = {
index 17ae3b1..16ce3ef 100644 (file)
@@ -1536,7 +1536,7 @@ err_gpio:
        return ret;
 }
 
-static int dac33_i2c_remove(struct i2c_client *client)
+static void dac33_i2c_remove(struct i2c_client *client)
 {
        struct tlv320dac33_priv *dac33 = i2c_get_clientdata(client);
 
@@ -1545,8 +1545,6 @@ static int dac33_i2c_remove(struct i2c_client *client)
 
        if (dac33->power_gpio >= 0)
                gpio_free(dac33->power_gpio);
-
-       return 0;
 }
 
 static const struct i2c_device_id tlv320dac33_i2c_id[] = {
index 9834362..0064a60 100644 (file)
@@ -228,11 +228,9 @@ static int wm1250_ev1_probe(struct i2c_client *i2c)
        return 0;
 }
 
-static int wm1250_ev1_remove(struct i2c_client *i2c)
+static void wm1250_ev1_remove(struct i2c_client *i2c)
 {
        wm1250_ev1_free(i2c);
-
-       return 0;
 }
 
 static const struct i2c_device_id wm1250_ev1_i2c_id[] = {
index 7b4e162..0a65afa 100644 (file)
@@ -2414,7 +2414,7 @@ err_enable:
        return ret;
 }
 
-static int wm2200_i2c_remove(struct i2c_client *i2c)
+static void wm2200_i2c_remove(struct i2c_client *i2c)
 {
        struct wm2200_priv *wm2200 = i2c_get_clientdata(i2c);
 
@@ -2427,8 +2427,6 @@ static int wm2200_i2c_remove(struct i2c_client *i2c)
                gpio_set_value_cansleep(wm2200->pdata.ldo_ena, 0);
        regulator_bulk_disable(ARRAY_SIZE(wm2200->core_supplies),
                               wm2200->core_supplies);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 35a85ce..3b09d4a 100644 (file)
@@ -2635,7 +2635,7 @@ err:
        return ret;
 }
 
-static int wm5100_i2c_remove(struct i2c_client *i2c)
+static void wm5100_i2c_remove(struct i2c_client *i2c)
 {
        struct wm5100_priv *wm5100 = i2c_get_clientdata(i2c);
 
@@ -2651,8 +2651,6 @@ static int wm5100_i2c_remove(struct i2c_client *i2c)
                gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
                gpio_free(wm5100->pdata.ldo_ena);
        }
-
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 04dc9fb..3ce1a39 100644 (file)
@@ -25,10 +25,9 @@ static int wm8804_i2c_probe(struct i2c_client *i2c)
        return wm8804_probe(&i2c->dev, regmap);
 }
 
-static int wm8804_i2c_remove(struct i2c_client *i2c)
+static void wm8804_i2c_remove(struct i2c_client *i2c)
 {
        wm8804_remove(&i2c->dev);
-       return 0;
 }
 
 static const struct i2c_device_id wm8804_i2c_id[] = {
index d6420df..03bbd85 100644 (file)
@@ -1282,10 +1282,8 @@ static int wm8900_i2c_probe(struct i2c_client *i2c)
        return ret;
 }
 
-static int wm8900_i2c_remove(struct i2c_client *client)
-{
-       return 0;
-}
+static void wm8900_i2c_remove(struct i2c_client *client)
+{}
 
 static const struct i2c_device_id wm8900_i2c_id[] = {
        { "wm8900", 0 },
index 54e0a76..41346e5 100644 (file)
@@ -2182,7 +2182,7 @@ err:
        return ret;
 }
 
-static int wm8903_i2c_remove(struct i2c_client *client)
+static void wm8903_i2c_remove(struct i2c_client *client)
 {
        struct wm8903_priv *wm8903 = i2c_get_clientdata(client);
 
@@ -2191,8 +2191,6 @@ static int wm8903_i2c_remove(struct i2c_client *client)
        if (client->irq)
                free_irq(client->irq, wm8903);
        wm8903_free_gpio(wm8903);
-
-       return 0;
 }
 
 static const struct of_device_id wm8903_of_match[] = {
index 3795651..0d16723 100644 (file)
@@ -1486,10 +1486,8 @@ static int wm8960_i2c_probe(struct i2c_client *i2c)
        return ret;
 }
 
-static int wm8960_i2c_remove(struct i2c_client *client)
-{
-       return 0;
-}
+static void wm8960_i2c_remove(struct i2c_client *client)
+{}
 
 static const struct i2c_device_id wm8960_i2c_id[] = {
        { "wm8960", 0 },
index 398c448..8104966 100644 (file)
@@ -3778,10 +3778,9 @@ err:
        return ret;
 }
 
-static int wm8962_i2c_remove(struct i2c_client *client)
+static void wm8962_i2c_remove(struct i2c_client *client)
 {
        pm_runtime_disable(&client->dev);
-       return 0;
 }
 
 #ifdef CONFIG_PM
index 8db98b5..22a47ac 100644 (file)
@@ -1722,15 +1722,13 @@ err_enable:
        return ret;
 }
 
-static int wm8993_i2c_remove(struct i2c_client *i2c)
+static void wm8993_i2c_remove(struct i2c_client *i2c)
 {
        struct wm8993_priv *wm8993 = i2c_get_clientdata(i2c);
 
        if (i2c->irq)
                free_irq(i2c->irq, wm8993);
        regulator_bulk_disable(ARRAY_SIZE(wm8993->supplies), wm8993->supplies);
-
-       return 0;
 }
 
 static const struct i2c_device_id wm8993_i2c_id[] = {
index 17f307a..b52ed89 100644 (file)
@@ -3065,7 +3065,7 @@ err:
        return ret;
 }
 
-static int wm8996_i2c_remove(struct i2c_client *client)
+static void wm8996_i2c_remove(struct i2c_client *client)
 {
        struct wm8996_priv *wm8996 = i2c_get_clientdata(client);
 
@@ -3074,8 +3074,6 @@ static int wm8996_i2c_remove(struct i2c_client *client)
                gpio_set_value_cansleep(wm8996->pdata.ldo_ena, 0);
                gpio_free(wm8996->pdata.ldo_ena);
        }
-
-       return 0;
 }
 
 static const struct i2c_device_id wm8996_i2c_id[] = {
index d515187..513ec0b 100644 (file)
@@ -1356,10 +1356,8 @@ static int wm9081_i2c_probe(struct i2c_client *i2c)
        return 0;
 }
 
-static int wm9081_i2c_remove(struct i2c_client *client)
-{
-       return 0;
-}
+static void wm9081_i2c_remove(struct i2c_client *client)
+{}
 
 static const struct i2c_device_id wm9081_i2c_id[] = {
        { "wm9081", 0 },