diff --git a/platform/marvell-teralynx/mrvl-teralynx b/platform/marvell-teralynx/mrvl-teralynx index 3c265da0428..53d8dcf6270 160000 --- a/platform/marvell-teralynx/mrvl-teralynx +++ b/platform/marvell-teralynx/mrvl-teralynx @@ -1 +1 @@ -Subproject commit 3c265da04286347f687d88df17bc6373204a6c77 +Subproject commit 53d8dcf6270719e7bdc42619e182015bb2245ac7 diff --git a/platform/marvell-teralynx/sonic-platform-marvell-teralynx b/platform/marvell-teralynx/sonic-platform-marvell-teralynx index dafbe124ef1..b5638dfe558 160000 --- a/platform/marvell-teralynx/sonic-platform-marvell-teralynx +++ b/platform/marvell-teralynx/sonic-platform-marvell-teralynx @@ -1 +1 @@ -Subproject commit dafbe124ef14e7b9f1e0a52076ce8b8d14c88d6b +Subproject commit b5638dfe5587cb2a5c37f78cf99d89a2a081be23 diff --git a/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_cpld.c b/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_cpld.c index 3a99d230402..bde30b2901d 100755 --- a/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_cpld.c +++ b/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_cpld.c @@ -736,7 +736,12 @@ static struct i2c_adapter * cel_ms200i_i2c_init(struct platform_device *pdev, in new_adapter->dev.parent = &pdev->dev; new_adapter->owner = THIS_MODULE; - new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + + #ifdef I2C_CLASS_SPD + new_adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; + #else + new_adapter->class = I2C_CLASS_HWMON; + #endif new_adapter->algo = &ms200i_i2c_algorithm; snprintf(new_adapter->name, sizeof(new_adapter->name), @@ -812,7 +817,7 @@ static int cel_ms200i_lpc_drv_probe(struct platform_device *pdev) return 0; } -static int cel_ms200i_lpc_drv_remove(struct platform_device *pdev) +static void cel_ms200i_lpc_drv_remove(struct platform_device *pdev) { int portid_count; struct ms200i_i2c_data *new_data; @@ -821,7 +826,6 @@ static int cel_ms200i_lpc_drv_remove(struct platform_device *pdev) for (portid_count=1 ; portid_count<=LENGTH_PORT_CPLD ; portid_count++) i2c_del_adapter(cpld_data->i2c_adapter[portid_count-1]); - return 0; } static struct platform_driver cel_ms200i_lpc_drv = { diff --git a/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_wdt.c b/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_wdt.c index 9b3d79cc5a6..59878ef5823 100755 --- a/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_wdt.c +++ b/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/200i_wdt.c @@ -315,7 +315,7 @@ static int ms200i_wdt_probe(struct platform_device *pdev) return ret; } -static int ms200i_wdt_remove(struct platform_device *pdev) +static void ms200i_wdt_remove(struct platform_device *pdev) { struct ms200i_wdt_drvdata *drvdata = platform_get_drvdata(pdev); @@ -323,7 +323,6 @@ static int ms200i_wdt_remove(struct platform_device *pdev) #ifdef ENAB_DEBUG printk(KERN_INFO "MS200i WDT Remove"); #endif - return 0; } static struct platform_driver ms200i_wdt_drv = { diff --git a/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/mc24lc64t.c b/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/mc24lc64t.c index b66a7000620..c73a0002a01 100755 --- a/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/mc24lc64t.c +++ b/platform/marvell-teralynx/sonic-platform-modules-cel/midstone-200i/modules/mc24lc64t.c @@ -79,8 +79,7 @@ static struct bin_attribute mc24lc64t_bit_attr = { .read = mc24lc64t_read, }; -static int mc24lc64t_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int mc24lc64t_probe(struct i2c_client *client) { struct i2c_adapter *adapter = client->adapter; struct mc24lc64t_data *drvdata; diff --git a/platform/marvell-teralynx/sonic-platform-modules-supermicro/debian/rules b/platform/marvell-teralynx/sonic-platform-modules-supermicro/debian/rules old mode 100644 new mode 100755 diff --git a/platform/marvell-teralynx/sonic-platform-modules-supermicro/sse-t7132s/modules/t7132s.c b/platform/marvell-teralynx/sonic-platform-modules-supermicro/sse-t7132s/modules/t7132s.c index c1fc33d3257..26340e5760a 100755 --- a/platform/marvell-teralynx/sonic-platform-modules-supermicro/sse-t7132s/modules/t7132s.c +++ b/platform/marvell-teralynx/sonic-platform-modules-supermicro/sse-t7132s/modules/t7132s.c @@ -1401,7 +1401,7 @@ static int t7132s_drv_probe(struct platform_device *pdev) int adapter_id = 0; int chan_id = 0; - cpld_class = class_create(THIS_MODULE, CLASS_NAME); + cpld_class = class_create(CLASS_NAME); ret = PTR_ERR(cpld_class); cpld_data = devm_kzalloc(&pdev->dev, sizeof(struct t7132s_cpld), @@ -1517,7 +1517,7 @@ static int t7132s_drv_probe(struct platform_device *pdev) return 0; } -static int t7132s_drv_remove(struct platform_device *pdev) +static void t7132s_drv_remove(struct platform_device *pdev) { int ret = 0; int port_count = 0; @@ -1556,7 +1556,6 @@ static int t7132s_drv_remove(struct platform_device *pdev) devm_kfree(&pdev->dev, cpld_data); devm_kfree(&pdev->dev, pwddev); - return 0; } static struct platform_driver t7132s_drv = { diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/oldjc42.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/oldjc42.c index 0907e8fe1ec..23cf8c55440 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/oldjc42.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/oldjc42.c @@ -437,7 +437,8 @@ static int jc42_detect(struct i2c_client *client, struct i2c_board_info *info) struct jc42_chips *chip = &jc42_chips[i]; if (manid == chip->manid && (devid & chip->devid_mask) == chip->devid) { - strlcpy(info->type, "jc42", I2C_NAME_SIZE); + strncpy(info->type, "jc42", I2C_NAME_SIZE - 1); + info->type[I2C_NAME_SIZE - 1] = '\0'; // Ensure null-termination return 0; } } @@ -580,13 +581,17 @@ MODULE_DEVICE_TABLE(of, jc42_of_ids); #endif static struct i2c_driver jc42_driver = { - .class = I2C_CLASS_SPD | I2C_CLASS_HWMON, + #ifdef I2C_CLASS_SPD + .class = I2C_CLASS_SPD | I2C_CLASS_HWMON, + #else + .class = I2C_CLASS_HWMON, + #endif .driver = { .name = "oldjc42", .pm = JC42_DEV_PM_OPS, .of_match_table = of_match_ptr(jc42_of_ids), }, - .probe_new = jc42_probe, + .probe = jc42_probe, .remove = jc42_remove, .id_table = jc42_id, .detect = jc42_detect, diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_cpld.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_cpld.c index e104569975a..89f888bf9d4 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_cpld.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_cpld.c @@ -943,8 +943,9 @@ static void wistron_cpld_remove_client(struct i2c_client *client) /* * I2C init/probing/exit functions */ -static int wistron_cpld_probe(struct i2c_client *client, const struct i2c_device_id *id) +static int wistron_cpld_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct wistron_cpld_data *data; int ret = -ENODEV; const struct attribute_group *group = NULL; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_fan.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_fan.c index 68e2baab031..e14bb122a2b 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_fan.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_fan.c @@ -181,7 +181,7 @@ static const struct attribute_group wistron_fan_group = { .attrs = wistron_fan_attributes, }; -static int wistron_fan_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) +static int wistron_fan_probe(struct i2c_client *client) { struct wistron_fan_data *data; int status; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_leds.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_leds.c index a9e143624eb..0ce41912dd7 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_leds.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_leds.c @@ -179,15 +179,13 @@ static int wistron_led_probe(struct platform_device *pdev) return ret; } -static int wistron_led_remove(struct platform_device *pdev) +static void wistron_led_remove(struct platform_device *pdev) { int i; for (i = 0; i < ARRAY_SIZE(wistron_leds); i++) { led_classdev_unregister(&wistron_leds[i]); } - - return 0; } static struct platform_driver wistron_led_driver = { diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_oom.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_oom.c index 2c917650710..d41247b0b49 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_oom.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_oom.c @@ -576,8 +576,9 @@ static const struct attribute_group wistron_oom_group = { .attrs = wistron_oom_attributes, }; -static int wistron_oom_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) +static int wistron_oom_probe(struct i2c_client *client) { + const struct i2c_device_id *dev_id = i2c_client_get_device_id(client); struct wistron_oom_data *data; int status; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_psu.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_psu.c index a5bbff3bd3f..297cc8efd49 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_psu.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_psu.c @@ -293,9 +293,9 @@ static const struct attribute_group wistron_psu_group = { .attrs = wistron_psu_attributes, }; -static int wistron_psu_probe(struct i2c_client *client, - const struct i2c_device_id *dev_id) +static int wistron_psu_probe(struct i2c_client *client) { + const struct i2c_device_id *dev_id = i2c_client_get_device_id(client); struct wistron_psu_data *data; int status; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_syseeprom.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_syseeprom.c index 50ab6a1a5aa..8e9cfb61c94 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_syseeprom.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_syseeprom.c @@ -78,8 +78,9 @@ static const struct attribute_group wistron_syseeprom_group = { .attrs = wistron_syseeprom_attributes, }; -static int wistron_syseeprom_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) +static int wistron_syseeprom_probe(struct i2c_client *client) { + const struct i2c_device_id *dev_id = i2c_client_get_device_id(client); struct wistron_syseeprom_data *data; int status; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_thermal.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_thermal.c index df8232d5abf..6c0641eef78 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_thermal.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/6512-32r/modules/wistron_6512_32r_thermal.c @@ -115,8 +115,9 @@ static const struct attribute_group wistron_thermal_group = { .attrs = wistron_thermal_attributes, }; -static int wistron_thermal_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) +static int wistron_thermal_probe(struct i2c_client *client) { + const struct i2c_device_id *dev_id = i2c_client_get_device_id(client); struct wistron_thermal_data *data; int status; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/compat b/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/compat deleted file mode 100644 index b4de3947675..00000000000 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/control b/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/control index 00ad6637c37..a4fe76446e0 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/control +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/control @@ -2,13 +2,17 @@ Source: sonic-wistron-platform-modules Section: main Priority: extra Maintainer: Wistron -Build-Depends: debhelper (>= 8.0.0), bzip2 +Build-Depends: debhelper-compat (= 13), python3 +Rules-Requires-Root: no +Depends: linux-image-6.12.41+deb13-sonic-amd64-unsigned Standards-Version: 3.9.3 Package: sonic-platform-wistron-sw-to3200k Architecture: amd64 +Depends: linux-image-6.12.41+deb13-sonic-amd64-unsigned Description: kernel modules for platform devices such as fan, led, sfp Package: sonic-platform-wistron-6512-32r Architecture: amd64 +Depends: linux-image-6.12.41+deb13-sonic-amd64-unsigned Description: kernel modules for platform devices such as fan, led, sfp diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/rules b/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/rules index defb1f932d1..bf9747212e8 100755 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/rules +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/debian/rules @@ -13,9 +13,6 @@ include /usr/share/dpkg/pkg-info.mk export INSTALL_MOD_DIR:=extra -PYTHON ?= python2 -PYTHON3 ?= python3 - PACKAGE_PRE_NAME := sonic-platform-wistron KVERSION ?= $(shell uname -r) KERNEL_SRC := /lib/modules/$(KVERSION) @@ -27,117 +24,46 @@ SERVICE_DIR := service CONF_DIR := conf %: - dh $@ --with systemd,python2,python3 --buildsystem=pybuild + dh $@ --with python3 --buildsystem=pybuild --pybuild-system=setuptools -clean: - dh_testdir - dh_testroot +override_dh_auto_clean: + (set -e; for mod in $(MODULE_DIRS); do \ + make clean -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \ + if [ -f $(MOD_SRC_DIR)/$${mod}/setup.py ]; then \ + pybuild --clean -d $${mod}; \ + fi; \ + done) dh_clean -build: - #make modules -C $(KERNEL_SRC)/build M=$(MODULE_SRC) - (for mod in $(MODULE_DIRS); do \ +override_dh_auto_configure: + (set -e; for mod in $(MODULE_DIRS); do \ + if [ -f $(MOD_SRC_DIR)/$${mod}/setup.py ]; then \ + pybuild --configure -d $${mod}; \ + fi; \ + done) + +override_dh_auto_build: + (set -e; for mod in $(MODULE_DIRS); do \ make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \ - #$(PYTHON) $${mod}/setup.py build; \ cd $(MOD_SRC_DIR)/$${mod}; \ if [ -f setup.py ]; then \ - $(PYTHON3) setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}; \ + python3 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}; \ echo "Finished making whl package for $$mod"; \ fi; \ cd $(MOD_SRC_DIR); \ done) -binary: binary-arch binary-indep - # Nothing to do - -binary-arch: - # Nothing to do - -#install: build - #dh_testdir - #dh_testroot - #dh_clean -k - #dh_installdirs +override_dh_auto_test: + # No tests to run -binary-indep: - dh_testdir - dh_installdirs +override_dh_usrlocal: + # Skip dh_usrlocal because we manually install files to /usr/local/bin - # Custom package commands - (for mod in $(MODULE_DIRS); do \ +override_dh_auto_install: + (set -e; for mod in $(MODULE_DIRS); do \ dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} $(KERNEL_SRC)/$(INSTALL_MOD_DIR); \ dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} usr/local/bin; \ dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} lib/systemd/system; \ cp $(MOD_SRC_DIR)/$${mod}/$(MODULE_DIR)/*.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \ - #cp $(MOD_SRC_DIR)/$${mod}/$(UTILS_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin/; \ - cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR)/*.service debian/$(PACKAGE_PRE_NAME)-$${mod}/lib/systemd/system/; \ - #$(PYTHON) $${mod}/setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME)-$${mod} --install-layout=deb; \ done) - # Resuming debhelper scripts - dh_testroot - dh_install - dh_installchangelogs - dh_installdocs - dh_installsystemd - dh_installinit - dh_link - dh_fixperms - dh_compress - dh_strip - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb -.PHONY: build binary binary-arch binary-indep clean -##!/usr/bin/make -f -# -#export INSTALL_MOD_DIR:=extra -# -#PYTHON ?= python2 -#PYTHON3 ?= python3 -# -#KVERSION ?= $(shell uname -r) -#KERNEL_SRC := /lib/modules/$(KVERSION) -#MOD_SRC_DIR:= $(shell pwd) -# -#PACKAGE_PRE_NAME := sonic-platform-wistron -#MODULE_DIRS := 3306-32 -#MODULE_SRC := modules -##UTILITY_SRC := utils -#SERVICE_SRC := service -#COMMON_SRC := common -#%: -# dh $@ -# -# -#override_dh_auto_build: -# (for mod in $(MODULE_DIRS); do \ -# make modules -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules; \ -# cd $(MOD_SRC_DIR)/$${mod}; \ -# python2.7 setup.py bdist_wheel -d $(MOD_SRC_DIR)/$${mod}/modules; \ -# cd $(MOD_SRC_DIR); \ -# done) -# -#override_dh_auto_install: -# (for mod in $(MODULE_DIRS); do \ -# dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} \ -# $(KERNEL_SRC)/$(INSTALL_MOD_DIR); \ -# cp $(MOD_SRC_DIR)/$${mod}/$(MODULE_SRC)/*.ko \ -# debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \ -# dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} usr/local/bin; \ -## cp $(MOD_SRC_DIR)/$${mod}/$(UTILITY_SRC)/* \ -## debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin; \ -# dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} lib/systemd/system; \ -# cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_SRC)/*.service \ -# debian/$(PACKAGE_PRE_NAME)-$${mod}/lib/systemd/system; \ -# done) -# -#override_dh_usrlocal: -# -#override_dh_clean: -# dh_clean -# $(RM) -r $(COMMON_SRC)/*.o $(COMMON_SRC)/.*.cmd -# (for mod in $(MODULE_DIRS); do \ -# make -C $(KERNEL_SRC)/build M=$(MOD_SRC_DIR)/$${mod}/modules clean; \ -# done) diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_i2c_psu.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_i2c_psu.c index 6b531f69e3c..b66637b9b5b 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_i2c_psu.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_i2c_psu.c @@ -380,7 +380,7 @@ static const struct attribute_group wistron_i2c_psu_group = { .attrs = wistron_i2c_psu_attributes, }; -static int wistron_i2c_psu_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) +static int wistron_i2c_psu_probe(struct i2c_client *client) { struct wistron_i2c_psu_data *data; int status; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_cpld.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_cpld.c index ba1bd6dc41b..663393caa98 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_cpld.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_cpld.c @@ -540,8 +540,9 @@ static void sw_to3200k_cpld_remove_client(struct i2c_client *client) /* * I2C init/probing/exit functions */ -static int sw_to3200k_cpld_probe(struct i2c_client *client, const struct i2c_device_id *id) +static int sw_to3200k_cpld_probe(struct i2c_client *client) { + const struct i2c_device_id *id = i2c_client_get_device_id(client); struct sw_to3200k_cpld_data *data; int ret = -ENODEV; const struct attribute_group *group = NULL; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_fan.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_fan.c index 51ec5e2d018..42e2c986d9a 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_fan.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_fan.c @@ -255,11 +255,7 @@ static const struct attribute_group sw_to3200k_fan_group = { .attrs = sw_to3200k_fan_attributes, }; -static int sw_to3200k_fan_probe -( - struct i2c_client *client, - const struct i2c_device_id *dev_id -) +static int sw_to3200k_fan_probe(struct i2c_client *client) { struct sw_to3200k_fan_data *data; int status; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_leds.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_leds.c index 65be12e9f0b..69c76c24a4e 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_leds.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_leds.c @@ -222,7 +222,7 @@ static int wistron_sw_to3200k_led_probe(struct platform_device *pdev) return ret; } -static int wistron_sw_to3200k_led_remove(struct platform_device *pdev) +static void wistron_sw_to3200k_led_remove(struct platform_device *pdev) { int i; @@ -230,8 +230,6 @@ static int wistron_sw_to3200k_led_remove(struct platform_device *pdev) { led_classdev_unregister(&wistron_sw_to3200k_leds[i]); } - - return 0; } static struct platform_driver wistron_sw_to3200k_led_driver = { diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_oom.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_oom.c index 6d1577acff3..6bf5afe9ae4 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_oom.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_oom.c @@ -307,11 +307,11 @@ static const struct attribute_group sw_to3200k_oom_group = { .attrs = sw_to3200k_oom_attributes, }; -static int sw_to3200k_oom_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) +static int sw_to3200k_oom_probe(struct i2c_client *client) { + const struct i2c_device_id *dev_id = i2c_client_get_device_id(client); struct sw_to3200k_oom_data *data; int status; - data = kzalloc(sizeof(struct sw_to3200k_oom_data), GFP_KERNEL); if (!data) { diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_psu.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_psu.c index 60b142c0d3e..eb66caf34b0 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_psu.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_psu.c @@ -173,9 +173,9 @@ static const struct attribute_group sw_to3200k_psu_group = { .attrs = sw_to3200k_psu_attributes, }; -static int sw_to3200k_psu_probe(struct i2c_client *client, - const struct i2c_device_id *dev_id) +static int sw_to3200k_psu_probe(struct i2c_client *client) { + const struct i2c_device_id *dev_id = i2c_client_get_device_id(client); struct sw_to3200k_psu_data *data; int status; diff --git a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_thermal.c b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_thermal.c index a500fa0fc32..47369d1df7e 100644 --- a/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_thermal.c +++ b/platform/marvell-teralynx/sonic-platform-modules-wistron/sw-to3200k/modules/wistron_sw_to3200k_thermal.c @@ -115,11 +115,11 @@ static const struct attribute_group sw_to3200k_thermal_group = { .attrs = sw_to3200k_thermal_attributes, }; -static int sw_to3200k_thermal_probe(struct i2c_client *client, const struct i2c_device_id *dev_id) +static int sw_to3200k_thermal_probe(struct i2c_client *client) { + const struct i2c_device_id *dev_id = i2c_client_get_device_id(client); struct sw_to3200k_thermal_data *data; int status; - data = kzalloc(sizeof(struct sw_to3200k_thermal_data), GFP_KERNEL); if (!data) {