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

Configure Feed

Select the types of activity you want to include in your feed.

platform/x86: x86-android-tablets: Pass struct device to init()

Pass a struct device pointer for x86_android_tablet_device to the board
specific init() functions, so that these functions can use this for
e.g. devm_*() functions.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240509141207.63570-1-hdegoede@redhat.com

+10 -10
+1 -1
drivers/platform/x86/x86-android-tablets/core.c
··· 341 341 gpiod_add_lookup_table(gpiod_lookup_tables[i]); 342 342 343 343 if (dev_info->init) { 344 - ret = dev_info->init(); 344 + ret = dev_info->init(&pdev->dev); 345 345 if (ret < 0) { 346 346 x86_android_tablet_remove(pdev); 347 347 return ret;
+5 -5
drivers/platform/x86/x86-android-tablets/lenovo.c
··· 230 230 NULL 231 231 }; 232 232 233 - static int __init lenovo_yb1_x90_init(void) 233 + static int __init lenovo_yb1_x90_init(struct device *dev) 234 234 { 235 235 /* Enable the regulators used by the touchscreens */ 236 236 ··· 412 412 NULL 413 413 }; 414 414 415 - static int __init lenovo_yoga_tab2_830_1050_init(void); 415 + static int __init lenovo_yoga_tab2_830_1050_init(struct device *dev); 416 416 static void lenovo_yoga_tab2_830_1050_exit(void); 417 417 418 418 const struct x86_dev_info lenovo_yoga_tab2_830_1050_info __initconst = { ··· 534 534 return NOTIFY_DONE; 535 535 } 536 536 537 - static int __init lenovo_yoga_tab2_830_1050_init(void) 537 + static int __init lenovo_yoga_tab2_830_1050_init(struct device *dev) 538 538 { 539 539 int ret; 540 540 ··· 731 731 NULL 732 732 }; 733 733 734 - static int __init lenovo_yoga_tab2_1380_init(void) 734 + static int __init lenovo_yoga_tab2_1380_init(struct device *dev) 735 735 { 736 736 int ret; 737 737 ··· 978 978 } 979 979 }; 980 980 981 - static int __init lenovo_yt3_init(void) 981 + static int __init lenovo_yt3_init(struct device *dev) 982 982 { 983 983 int ret; 984 984
+3 -3
drivers/platform/x86/x86-android-tablets/other.c
··· 183 183 }, 184 184 }; 185 185 186 - static int __init chuwi_hi8_init(void) 186 + static int __init chuwi_hi8_init(struct device *dev) 187 187 { 188 188 /* 189 189 * Avoid the acpi_unregister_gsi() call in x86_acpi_irq_helper_get() ··· 244 244 #define CZC_EC_EXTRA_PORT 0x68 245 245 #define CZC_EC_ANDROID_KEYS 0x63 246 246 247 - static int __init czc_p10t_init(void) 247 + static int __init czc_p10t_init(struct device *dev) 248 248 { 249 249 /* 250 250 * The device boots up in "Windows 7" mode, when the home button sends a ··· 662 662 NULL 663 663 }; 664 664 665 - static int __init xiaomi_mipad2_init(void) 665 + static int __init xiaomi_mipad2_init(struct device *dev) 666 666 { 667 667 return software_node_register_node_group(ktd2026_node_group); 668 668 }
+1 -1
drivers/platform/x86/x86-android-tablets/x86-android-tablets.h
··· 89 89 int pdev_count; 90 90 int serdev_count; 91 91 int gpio_button_count; 92 - int (*init)(void); 92 + int (*init)(struct device *dev); 93 93 void (*exit)(void); 94 94 }; 95 95