Skip to content

Commit b83ea9b

Browse files
[AS7926-40XFB] Upgrade kernel drivers to 6.12 LTS (#121)
- modules/PKG.yml, builds/Makefile: bump KERNELS to onl-kernel-6.12-lts-x86-64-all:amd64 - platform-config r0.yml: switch to *kernel-6-12 anchor - cpld.c, psu.c: drop 2nd arg from i2c_driver.probe (6.12 API) - fan.c, leds.c, sys.c, thermal.c: change platform_driver.remove return type to void - sysi.c: zero-init onlp_onie_info_t to prevent double-free crash Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f348eda commit b83ea9b

10 files changed

Lines changed: 16 additions & 25 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
!include $ONL_TEMPLATES/platform-modules.yml VENDOR=accton BASENAME=x86-64-accton-as7926-40xfb ARCH=amd64 KERNELS="onl-kernel-6.1-lts-x86-64-all:amd64"
1+
!include $ONL_TEMPLATES/platform-modules.yml VENDOR=accton BASENAME=x86-64-accton-as7926-40xfb ARCH=amd64 KERNELS="onl-kernel-6.12-lts-x86-64-all:amd64"

packages/platforms/accton/x86-64/as7926-40xfb/modules/builds/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
KERNELS := onl-kernel-6.1-lts-x86-64-all:amd64
1+
KERNELS := onl-kernel-6.12-lts-x86-64-all:amd64
22
KMODULES := src
33
VENDOR := accton
44
BASENAME := x86-64-accton-as7926-40xfb

packages/platforms/accton/x86-64/as7926-40xfb/modules/builds/src/x86-64-accton-as7926-40xfb-cpld.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,9 +955,9 @@ static const struct hwmon_chip_info as7926_40xfb_cpld_chip_info = {
955955
.info = as7926_40xfb_cpld_info,
956956
};
957957

958-
static int as7926_40xfb_cpld_probe(struct i2c_client *client,
959-
const struct i2c_device_id *dev_id)
958+
static int as7926_40xfb_cpld_probe(struct i2c_client *client)
960959
{
960+
const struct i2c_device_id *dev_id = i2c_client_get_device_id(client);
961961
int status;
962962
struct as7926_40xfb_cpld_data *data = NULL;
963963

packages/platforms/accton/x86-64/as7926-40xfb/modules/builds/src/x86-64-accton-as7926-40xfb-fan.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static ssize_t show_dir(struct device *dev, struct device_attribute *da,
5555
static ssize_t show_threshold(struct device *dev, struct device_attribute *da,
5656
char *buf);
5757
static int as7926_40xfb_fan_probe(struct platform_device *pdev);
58-
static int as7926_40xfb_fan_remove(struct platform_device *pdev);
58+
static void as7926_40xfb_fan_remove(struct platform_device *pdev);
5959

6060
enum fan_id {
6161
FAN_1,
@@ -519,11 +519,9 @@ static int as7926_40xfb_fan_probe(struct platform_device *pdev)
519519
return status;
520520
}
521521

522-
static int as7926_40xfb_fan_remove(struct platform_device *pdev)
522+
static void as7926_40xfb_fan_remove(struct platform_device *pdev)
523523
{
524524
sysfs_remove_group(&pdev->dev.kobj, &as7926_40xfb_fan_group);
525-
526-
return 0;
527525
}
528526

529527
static int __init as7926_40xfb_fan_init(void)

packages/platforms/accton/x86-64/as7926-40xfb/modules/builds/src/x86-64-accton-as7926-40xfb-leds.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static ssize_t set_led(struct device *dev, struct device_attribute *da,
4646
static ssize_t show_led(struct device *dev, struct device_attribute *attr,
4747
char *buf);
4848
static int as7926_40xfb_led_probe(struct platform_device *pdev);
49-
static int as7926_40xfb_led_remove(struct platform_device *pdev);
49+
static void as7926_40xfb_led_remove(struct platform_device *pdev);
5050

5151
struct as7926_40xfb_led_data {
5252
struct platform_device *pdev;
@@ -290,11 +290,9 @@ static int as7926_40xfb_led_probe(struct platform_device *pdev)
290290
return status;
291291
}
292292

293-
static int as7926_40xfb_led_remove(struct platform_device *pdev)
293+
static void as7926_40xfb_led_remove(struct platform_device *pdev)
294294
{
295295
sysfs_remove_group(&pdev->dev.kobj, &as7926_40xfb_led_group);
296-
297-
return 0;
298296
}
299297

300298
static int __init as7926_40xfb_led_init(void)

packages/platforms/accton/x86-64/as7926-40xfb/modules/builds/src/x86-64-accton-as7926-40xfb-psu.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static ssize_t show_psu_info(struct device *dev, struct device_attribute *attr,
5252
static ssize_t show_string(struct device *dev, struct device_attribute *attr,
5353
char *buf);
5454
static int as7926_40xfb_psu_probe(struct platform_device *pdev);
55-
static int as7926_40xfb_psu_remove(struct platform_device *pdev);
55+
static void as7926_40xfb_psu_remove(struct platform_device *pdev);
5656

5757
enum psu_id {
5858
PSU_1,
@@ -703,10 +703,9 @@ static int as7926_40xfb_psu_probe(struct platform_device *pdev)
703703
return status;
704704
}
705705

706-
static int as7926_40xfb_psu_remove(struct platform_device *pdev)
706+
static void as7926_40xfb_psu_remove(struct platform_device *pdev)
707707
{
708708
sysfs_remove_group(&pdev->dev.kobj, &as7926_40xfb_psu_group);
709-
return 0;
710709
}
711710

712711
static int __init as7926_40xfb_psu_init(void)

packages/platforms/accton/x86-64/as7926-40xfb/modules/builds/src/x86-64-accton-as7926-40xfb-sys.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#define EEPROM_SIZE 256 /* 256 byte eeprom */
4949

5050
static int as7926_40xfb_sys_probe(struct platform_device *pdev);
51-
static int as7926_40xfb_sys_remove(struct platform_device *pdev);
51+
static void as7926_40xfb_sys_remove(struct platform_device *pdev);
5252
static ssize_t get_reset(struct device *dev, struct device_attribute *da,
5353
char *buf);
5454
static ssize_t set_reset(struct device *dev, struct device_attribute *da,
@@ -404,12 +404,10 @@ static int as7926_40xfb_sys_probe(struct platform_device *pdev)
404404
return status;
405405
}
406406

407-
static int as7926_40xfb_sys_remove(struct platform_device *pdev)
407+
static void as7926_40xfb_sys_remove(struct platform_device *pdev)
408408
{
409409
sysfs_remove_group(&pdev->dev.kobj, &as7926_40xfb_sys_group);
410410
sysfs_eeprom_cleanup(&pdev->dev.kobj, &data->eeprom);
411-
412-
return 0;
413411
}
414412

415413
static int __init as7926_40xfb_sys_init(void)

packages/platforms/accton/x86-64/as7926-40xfb/modules/builds/src/x86-64-accton-as7926-40xfb-thermal.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *attr,
4646
static ssize_t set_max(struct device *dev, struct device_attribute *da,
4747
const char *buf, size_t count);
4848
static int as7926_40xfb_thermal_probe(struct platform_device *pdev);
49-
static int as7926_40xfb_thermal_remove(struct platform_device *pdev);
49+
static void as7926_40xfb_thermal_remove(struct platform_device *pdev);
5050

5151
enum temp_data_index {
5252
TEMP_ADDR,
@@ -230,11 +230,9 @@ static int as7926_40xfb_thermal_probe(struct platform_device *pdev)
230230
return status;
231231
}
232232

233-
static int as7926_40xfb_thermal_remove(struct platform_device *pdev)
233+
static void as7926_40xfb_thermal_remove(struct platform_device *pdev)
234234
{
235235
sysfs_remove_group(&pdev->dev.kobj, &as7926_40xfb_thermal_group);
236-
237-
return 0;
238236
}
239237

240238
static int __init as7926_40xfb_thermal_init(void)

packages/platforms/accton/x86-64/as7926-40xfb/onlp/builds/x86_64_accton_as7926_40xfb/module/src/sysi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
110110
int bmc_major = 0, bmc_minor = 0;
111111
unsigned int bmc_aux[4] = {0};
112112
char bmc_ver[16] = "";
113-
onlp_onie_info_t onie;
113+
onlp_onie_info_t onie = {0};
114114
char *bios_ver = NULL;
115115

116116
for (i = 0; i < AIM_ARRAYSIZE(cpld_path); i++) {

packages/platforms/accton/x86-64/as7926-40xfb/platform-config/r0/src/lib/x86-64-accton-as7926-40xfb-r0.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ x86-64-accton-as7926-40xfb-r0:
1818
--stop=1
1919
2020
kernel:
21-
<<: *kernel-6-1
21+
<<: *kernel-6-12
2222

2323
args: >-
2424
console=ttyS0,115200n8

0 commit comments

Comments
 (0)