platform/x86: use PLATFORM_DEVID_NONE instead of -1
Subsystems (16)
PATCH 1/1 platform/x86: use PLATFORM_DEVID_NONE instead of -1
Use the PLATFORM_DEVID_NONE constant instead of hard-coding -1 when creating a platform device.
No functional changes are intended.
---
Since this is a trivial change, I did not CC the driver maintainers separately. I can send a new version if that is deemed necessary.
drivers/platform/x86/acer-wmi.c | 2 +- drivers/platform/x86/acerhdf.c | 2 +- drivers/platform/x86/amd/hsmp.c | 2 +- drivers/platform/x86/amilo-rfkill.c | 3 ++- drivers/platform/x86/asus-laptop.c | 2 +- drivers/platform/x86/compal-laptop.c | 2 +- drivers/platform/x86/dell/alienware-wmi.c | 2 +- drivers/platform/x86/dell/dcdbas.c | 2 +- drivers/platform/x86/dell/dell-laptop.c | 2 +- drivers/platform/x86/dell/dell_rbu.c | 2 +- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 2 +- drivers/platform/x86/hdaps.c | 2 +- drivers/platform/x86/hp-wmi.c | 2 +- drivers/platform/x86/huawei-wmi.c | 2 +- drivers/platform/x86/intel/oaktrail.c | 2 +- drivers/platform/x86/mlx-platform.c | 2 +- drivers/platform/x86/msi-laptop.c | 2 +- drivers/platform/x86/panasonic-laptop.c | 2 +- drivers/platform/x86/samsung-laptop.c | 2 +- drivers/platform/x86/sony-laptop.c | 2 +- drivers/platform/x86/tc1100-wmi.c | 2 +- drivers/platform/x86/thinkpad_acpi.c | 4 ++-- drivers/platform/x86/topstar-laptop.c | 2 +- drivers/platform/x86/winmate-fm07-keys.c | 2 +- 25 files changed, 27 insertions(+), 26 deletions(-)
drivers/platform/x86/acer-wmi.c +1 -1
@@ -2463,7 +2463,7 @@ static int __init acer_wmi_init(void) goto error_platform_register; } - acer_platform_device =platform_device_alloc ("acer-wmi" ,-1 ); + acer_platform_device =platform_device_alloc ("acer-wmi" ,PLATFORM_DEVID_NONE );if (!acer_platform_device) { err = -ENOMEM ; goto error_device_alloc;
drivers/platform/x86/acerhdf.c +1 -1
@@ -676,7 +676,7 @@ static int __init acerhdf_register_platform(void)if (err)return err; - acerhdf_dev =platform_device_alloc ("acerhdf" ,-1 ); + acerhdf_dev =platform_device_alloc ("acerhdf" ,PLATFORM_DEVID_NONE );if (!acerhdf_dev) { err = -ENOMEM ; goto err_device_alloc;
drivers/platform/x86/amd/hsmp.c +1 -1
@@ -392,7 +392,7 @@ static int __init hsmp_plt_init(void)if (ret)return ret; - amd_hsmp_platdev =platform_device_alloc (DRIVER_NAME ,-1 ); + amd_hsmp_platdev =platform_device_alloc (DRIVER_NAME ,PLATFORM_DEVID_NONE );if (!amd_hsmp_platdev) { ret = -ENOMEM ; goto drv_unregister;
drivers/platform/x86/amilo-rfkill.c +2 -1
@@ -150,7 +150,8 @@ static int __init amilo_rfkill_init(void)if (rc)return rc; - amilo_rfkill_pdev =platform_device_register_simple (KBUILD_MODNAME ,-1 , + amilo_rfkill_pdev =platform_device_register_simple (KBUILD_MODNAME , +PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (amilo_rfkill_pdev)) { rc =PTR_ERR (amilo_rfkill_pdev);
drivers/platform/x86/asus-laptop.c +1 -1
@@ -1633,7 +1633,7 @@ static int asus_platform_init(struct asus_laptop *asus) {int result; - asus->platform_device =platform_device_alloc (ASUS_LAPTOP_FILE ,-1 ); + asus->platform_device =platform_device_alloc (ASUS_LAPTOP_FILE ,PLATFORM_DEVID_NONE );if (!asus->platform_device)return -ENOMEM ;platform_set_drvdata (asus->platform_device, asus);
drivers/platform/x86/compal-laptop.c +1 -1
@@ -1060,7 +1060,7 @@ static int __init compal_init(void)if (ret) goto err_backlight; - compal_device =platform_device_alloc (DRIVER_NAME ,-1 ); + compal_device =platform_device_alloc (DRIVER_NAME ,PLATFORM_DEVID_NONE );if (!compal_device) { ret = -ENOMEM ; goto err_platform_driver;
drivers/platform/x86/dell/alienware-wmi.c +1 -1
@@ -791,7 +791,7 @@ static int __init alienware_wmi_init(void) ret =platform_driver_register (&platform_driver);if (ret) goto fail_platform_driver; - platform_device =platform_device_alloc ("alienware-wmi" ,-1 ); + platform_device =platform_device_alloc ("alienware-wmi" ,PLATFORM_DEVID_NONE );if (!platform_device) { ret = -ENOMEM ; goto fail_platform_device1;
drivers/platform/x86/dell/dcdbas.c +1 -1
@@ -716,7 +716,7 @@ static struct platform_driver dcdbas_driver = {static const struct platform_device_info dcdbas_dev_info__initconst = { .name =DRIVER_NAME , - .id =-1 , + .id =PLATFORM_DEVID_NONE , .dma_mask =DMA_BIT_MASK (32 ), };
drivers/platform/x86/dell/dell-laptop.c +1 -1
@@ -2193,7 +2193,7 @@ static int __init dell_init(void) ret =platform_driver_register (&platform_driver);if (ret) goto fail_platform_driver; - platform_device =platform_device_alloc ("dell-laptop" ,-1 ); + platform_device =platform_device_alloc ("dell-laptop" ,PLATFORM_DEVID_NONE );if (!platform_device) { ret = -ENOMEM ; goto fail_platform_device1;
drivers/platform/x86/dell/dell_rbu.c +1 -1
@@ -645,7 +645,7 @@ static int __init dcdrbu_init(void)spin_lock_init (&rbu_data.lock);init_packet_head (); - rbu_device =platform_device_register_simple ("dell_rbu" ,-1 ,NULL ,0 ); + rbu_device =platform_device_register_simple ("dell_rbu" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (rbu_device)) {pr_err ("platform_device_register_simple failed\n" );return PTR_ERR (rbu_device);
drivers/platform/x86/eeepc-laptop.c +1 -1
@@ -444,7 +444,7 @@ static int eeepc_platform_init(struct eeepc_laptop *eeepc) {int result; - eeepc->platform_device =platform_device_alloc (EEEPC_LAPTOP_FILE ,-1 ); + eeepc->platform_device =platform_device_alloc (EEEPC_LAPTOP_FILE ,PLATFORM_DEVID_NONE );if (!eeepc->platform_device)return -ENOMEM ;platform_set_drvdata (eeepc->platform_device, eeepc);
drivers/platform/x86/fujitsu-laptop.c +1 -1
@@ -543,7 +543,7 @@ static int fujitsu_laptop_platform_add(struct acpi_device *device)struct fujitsu_laptop *priv =acpi_driver_data (device);int ret; - priv->pf_device =platform_device_alloc ("fujitsu-laptop" ,-1 ); + priv->pf_device =platform_device_alloc ("fujitsu-laptop" ,PLATFORM_DEVID_NONE );if (!priv->pf_device)return -ENOMEM ;
drivers/platform/x86/hdaps.c +1 -1
@@ -547,7 +547,7 @@ static int __init hdaps_init(void)if (ret) goto out_region; - pdev =platform_device_register_simple ("hdaps" ,-1 ,NULL ,0 ); + pdev =platform_device_register_simple ("hdaps" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (pdev)) { ret =PTR_ERR (pdev); goto out_driver;
drivers/platform/x86/hp-wmi.c +1 -1
@@ -1519,7 +1519,7 @@ static int __init hp_wmi_init(void)if (bios_capable) { hp_wmi_platform_dev = -platform_device_register_simple ("hp-wmi" ,-1 ,NULL ,0 ); +platform_device_register_simple ("hp-wmi" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (hp_wmi_platform_dev)) { err =PTR_ERR (hp_wmi_platform_dev); goto err_destroy_input;
drivers/platform/x86/huawei-wmi.c +1 -1
@@ -871,7 +871,7 @@ static __init int huawei_wmi_init(void)if (err) goto pdrv_err; - pdev =platform_device_register_simple ("huawei-wmi" ,-1 ,NULL ,0 ); + pdev =platform_device_register_simple ("huawei-wmi" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (pdev)) { err =PTR_ERR (pdev); goto pdev_err;
drivers/platform/x86/intel/oaktrail.c +1 -1
@@ -317,7 +317,7 @@ static int __init oaktrail_init(void) goto err_driver_reg; } - oaktrail_device =platform_device_alloc (DRIVER_NAME ,-1 ); + oaktrail_device =platform_device_alloc (DRIVER_NAME ,PLATFORM_DEVID_NONE );if (!oaktrail_device) {pr_warn ("Unable to allocate platform device\n" ); ret = -ENOMEM ;
drivers/platform/x86/mlx-platform.c +1 -1
@@ -5181,7 +5181,7 @@ static int __init mlxplat_init(void)if (!dmi_check_system (mlxplat_dmi_table))return -ENODEV ; - mlxplat_dev =platform_device_register_simple (MLX_PLAT_DEVICE_NAME ,-1 , + mlxplat_dev =platform_device_register_simple (MLX_PLAT_DEVICE_NAME ,PLATFORM_DEVID_NONE , mlxplat_lpc_resources,ARRAY_SIZE (mlxplat_lpc_resources));
drivers/platform/x86/msi-laptop.c +1 -1
@@ -1066,7 +1066,7 @@ static int __init msi_init(void)/* Register platform stuff */ - msipf_device =platform_device_alloc ("msi-laptop-pf" ,-1 ); + msipf_device =platform_device_alloc ("msi-laptop-pf" ,PLATFORM_DEVID_NONE );if (!msipf_device) { ret = -ENOMEM ; goto fail_platform_driver;
drivers/platform/x86/panasonic-laptop.c +1 -1
@@ -1034,7 +1034,7 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)/* optical drive initialization */ if (ACPI_SUCCESS (check_optd_present ())) { pcc->platform =platform_device_register_simple ("panasonic" , --1 ,NULL ,0 ); +PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (pcc->platform)) { result =PTR_ERR (pcc->platform); goto out_backlight;
drivers/platform/x86/samsung-laptop.c +1 -1
@@ -1474,7 +1474,7 @@ static int __init samsung_platform_init(struct samsung_laptop *samsung) {struct platform_device *pdev; - pdev =platform_device_register_simple ("samsung" ,-1 ,NULL ,0 ); + pdev =platform_device_register_simple ("samsung" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (pdev))return PTR_ERR (pdev);
drivers/platform/x86/sony-laptop.c +1 -1
@@ -584,7 +584,7 @@ static int sony_pf_add(void)if (ret) goto out; - sony_pf_device =platform_device_alloc ("sony-laptop" ,-1 ); + sony_pf_device =platform_device_alloc ("sony-laptop" ,PLATFORM_DEVID_NONE );if (!sony_pf_device) { ret = -ENOMEM ; goto out_platform_registered;
drivers/platform/x86/tc1100-wmi.c +1 -1
@@ -233,7 +233,7 @@ static int __init tc1100_init(void)if (!wmi_has_guid (GUID ))return -ENODEV ; - tc1100_device =platform_device_alloc ("tc1100-wmi" ,-1 ); + tc1100_device =platform_device_alloc ("tc1100-wmi" ,PLATFORM_DEVID_NONE );if (!tc1100_device)return -ENOMEM ;
drivers/platform/x86/thinkpad_acpi.c +2 -2
@@ -11715,7 +11715,7 @@ static int __init thinkpad_acpi_module_init(void) tp_features.quirks = dmi_id->driver_data;/* Device initialization */ - tpacpi_pdev =platform_device_register_simple (TPACPI_DRVR_NAME ,-1 , + tpacpi_pdev =platform_device_register_simple (TPACPI_DRVR_NAME ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (tpacpi_pdev)) { ret =PTR_ERR (tpacpi_pdev);
@@ -11726,7 +11726,7 @@ static int __init thinkpad_acpi_module_init(void) } tpacpi_sensors_pdev =platform_device_register_simple (TPACPI_HWMON_DRVR_NAME , --1 ,NULL ,0 ); +PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (tpacpi_sensors_pdev)) { ret =PTR_ERR (tpacpi_sensors_pdev); tpacpi_sensors_pdev =NULL ;
drivers/platform/x86/topstar-laptop.c +1 -1
@@ -192,7 +192,7 @@ static int topstar_platform_init(struct topstar_laptop *topstar) {int err; - topstar->platform =platform_device_alloc (TOPSTAR_LAPTOP_CLASS ,-1 ); + topstar->platform =platform_device_alloc (TOPSTAR_LAPTOP_CLASS ,PLATFORM_DEVID_NONE );if (!topstar->platform)return -ENOMEM ;
drivers/platform/x86/winmate-fm07-keys.c +1 -1
@@ -161,7 +161,7 @@ static int __init fm07keys_init(void)return ret; } - dev =platform_device_register_simple (DRV_NAME ,-1 ,NULL ,0 ); + dev =platform_device_register_simple (DRV_NAME ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (dev)) { ret =PTR_ERR (dev);pr_err ("fm07keys: failed to allocate device, err = %d\n" , ret);
--
2.37.3
Hi,
Quoted 6 lines · Barnabás Pőcze
Use the
PLATFORM_DEVID_NONEconstant instead of hard-coding -1 when creating a platform device.No functional changes are intended.
Signed-off-by Barnabás Pőcze <[email protected]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans
Quoted 371 lines
---
Since this is a trivial change, I did not CC the driver maintainers separately. I can send a new version if that is deemed necessary.drivers/platform/x86/acer-wmi.c | 2 +- drivers/platform/x86/acerhdf.c | 2 +- drivers/platform/x86/amd/hsmp.c | 2 +- drivers/platform/x86/amilo-rfkill.c | 3 ++- drivers/platform/x86/asus-laptop.c | 2 +- drivers/platform/x86/compal-laptop.c | 2 +- drivers/platform/x86/dell/alienware-wmi.c | 2 +- drivers/platform/x86/dell/dcdbas.c | 2 +- drivers/platform/x86/dell/dell-laptop.c | 2 +- drivers/platform/x86/dell/dell_rbu.c | 2 +- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/platform/x86/fujitsu-laptop.c | 2 +- drivers/platform/x86/hdaps.c | 2 +- drivers/platform/x86/hp-wmi.c | 2 +- drivers/platform/x86/huawei-wmi.c | 2 +- drivers/platform/x86/intel/oaktrail.c | 2 +- drivers/platform/x86/mlx-platform.c | 2 +- drivers/platform/x86/msi-laptop.c | 2 +- drivers/platform/x86/panasonic-laptop.c | 2 +- drivers/platform/x86/samsung-laptop.c | 2 +- drivers/platform/x86/sony-laptop.c | 2 +- drivers/platform/x86/tc1100-wmi.c | 2 +- drivers/platform/x86/thinkpad_acpi.c | 4 ++-- drivers/platform/x86/topstar-laptop.c | 2 +- drivers/platform/x86/winmate-fm07-keys.c | 2 +- 25 files changed, 27 insertions(+), 26 deletions(-)drivers/platform/x86/acer-wmi.c +1
-1@@ -2463,7 +2463,7 @@ static int __init acer_wmi_init(void) goto error_platform_register; } - acer_platform_device =platform_device_alloc ("acer-wmi" ,-1 ); + acer_platform_device =platform_device_alloc ("acer-wmi" ,PLATFORM_DEVID_NONE );if (!acer_platform_device) { err = -ENOMEM ; goto error_device_alloc;drivers/platform/x86/acerhdf.c +1
-1@@ -676,7 +676,7 @@ static int __init acerhdf_register_platform(void)if (err)return err; - acerhdf_dev =platform_device_alloc ("acerhdf" ,-1 ); + acerhdf_dev =platform_device_alloc ("acerhdf" ,PLATFORM_DEVID_NONE );if (!acerhdf_dev) { err = -ENOMEM ; goto err_device_alloc;drivers/platform/x86/amd/hsmp.c +1
-1@@ -392,7 +392,7 @@ static int __init hsmp_plt_init(void)if (ret)return ret; - amd_hsmp_platdev =platform_device_alloc (DRIVER_NAME ,-1 ); + amd_hsmp_platdev =platform_device_alloc (DRIVER_NAME ,PLATFORM_DEVID_NONE );if (!amd_hsmp_platdev) { ret = -ENOMEM ; goto drv_unregister;drivers/platform/x86/amilo-rfkill.c +2
-1@@ -150,7 +150,8 @@ static int __init amilo_rfkill_init(void)if (rc)return rc; - amilo_rfkill_pdev =platform_device_register_simple (KBUILD_MODNAME ,-1 , + amilo_rfkill_pdev =platform_device_register_simple (KBUILD_MODNAME , +PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (amilo_rfkill_pdev)) { rc =PTR_ERR (amilo_rfkill_pdev);drivers/platform/x86/asus-laptop.c +1
-1@@ -1633,7 +1633,7 @@ static int asus_platform_init(struct asus_laptop *asus) {int result; - asus->platform_device =platform_device_alloc (ASUS_LAPTOP_FILE ,-1 ); + asus->platform_device =platform_device_alloc (ASUS_LAPTOP_FILE ,PLATFORM_DEVID_NONE );if (!asus->platform_device)return -ENOMEM ;platform_set_drvdata (asus->platform_device, asus);drivers/platform/x86/compal-laptop.c +1
-1@@ -1060,7 +1060,7 @@ static int __init compal_init(void)if (ret) goto err_backlight; - compal_device =platform_device_alloc (DRIVER_NAME ,-1 ); + compal_device =platform_device_alloc (DRIVER_NAME ,PLATFORM_DEVID_NONE );if (!compal_device) { ret = -ENOMEM ; goto err_platform_driver;drivers/platform/x86/dell/alienware-wmi.c +1
-1@@ -791,7 +791,7 @@ static int __init alienware_wmi_init(void) ret =platform_driver_register (&platform_driver);if (ret) goto fail_platform_driver; - platform_device =platform_device_alloc ("alienware-wmi" ,-1 ); + platform_device =platform_device_alloc ("alienware-wmi" ,PLATFORM_DEVID_NONE );if (!platform_device) { ret = -ENOMEM ; goto fail_platform_device1;drivers/platform/x86/dell/dcdbas.c +1
-1@@ -716,7 +716,7 @@ static struct platform_driver dcdbas_driver = {static const struct platform_device_info dcdbas_dev_info__initconst = { .name =DRIVER_NAME , - .id =-1 , + .id =PLATFORM_DEVID_NONE , .dma_mask =DMA_BIT_MASK (32 ), };drivers/platform/x86/dell/dell-laptop.c +1
-1@@ -2193,7 +2193,7 @@ static int __init dell_init(void) ret =platform_driver_register (&platform_driver);if (ret) goto fail_platform_driver; - platform_device =platform_device_alloc ("dell-laptop" ,-1 ); + platform_device =platform_device_alloc ("dell-laptop" ,PLATFORM_DEVID_NONE );if (!platform_device) { ret = -ENOMEM ; goto fail_platform_device1;drivers/platform/x86/dell/dell_rbu.c +1
-1@@ -645,7 +645,7 @@ static int __init dcdrbu_init(void)spin_lock_init (&rbu_data.lock);init_packet_head (); - rbu_device =platform_device_register_simple ("dell_rbu" ,-1 ,NULL ,0 ); + rbu_device =platform_device_register_simple ("dell_rbu" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (rbu_device)) {pr_err ("platform_device_register_simple failed\n" );return PTR_ERR (rbu_device);drivers/platform/x86/eeepc-laptop.c +1
-1@@ -444,7 +444,7 @@ static int eeepc_platform_init(struct eeepc_laptop *eeepc) {int result; - eeepc->platform_device =platform_device_alloc (EEEPC_LAPTOP_FILE ,-1 ); + eeepc->platform_device =platform_device_alloc (EEEPC_LAPTOP_FILE ,PLATFORM_DEVID_NONE );if (!eeepc->platform_device)return -ENOMEM ;platform_set_drvdata (eeepc->platform_device, eeepc);drivers/platform/x86/fujitsu-laptop.c +1
-1@@ -543,7 +543,7 @@ static int fujitsu_laptop_platform_add(struct acpi_device *device)struct fujitsu_laptop *priv =acpi_driver_data (device);int ret; - priv->pf_device =platform_device_alloc ("fujitsu-laptop" ,-1 ); + priv->pf_device =platform_device_alloc ("fujitsu-laptop" ,PLATFORM_DEVID_NONE );if (!priv->pf_device)return -ENOMEM ;drivers/platform/x86/hdaps.c +1
-1@@ -547,7 +547,7 @@ static int __init hdaps_init(void)if (ret) goto out_region; - pdev =platform_device_register_simple ("hdaps" ,-1 ,NULL ,0 ); + pdev =platform_device_register_simple ("hdaps" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (pdev)) { ret =PTR_ERR (pdev); goto out_driver;drivers/platform/x86/hp-wmi.c +1
-1@@ -1519,7 +1519,7 @@ static int __init hp_wmi_init(void)if (bios_capable) { hp_wmi_platform_dev = -platform_device_register_simple ("hp-wmi" ,-1 ,NULL ,0 ); +platform_device_register_simple ("hp-wmi" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (hp_wmi_platform_dev)) { err =PTR_ERR (hp_wmi_platform_dev); goto err_destroy_input;drivers/platform/x86/huawei-wmi.c +1
-1@@ -871,7 +871,7 @@ static __init int huawei_wmi_init(void)if (err) goto pdrv_err; - pdev =platform_device_register_simple ("huawei-wmi" ,-1 ,NULL ,0 ); + pdev =platform_device_register_simple ("huawei-wmi" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (pdev)) { err =PTR_ERR (pdev); goto pdev_err;drivers/platform/x86/intel/oaktrail.c +1
-1@@ -317,7 +317,7 @@ static int __init oaktrail_init(void) goto err_driver_reg; } - oaktrail_device =platform_device_alloc (DRIVER_NAME ,-1 ); + oaktrail_device =platform_device_alloc (DRIVER_NAME ,PLATFORM_DEVID_NONE );if (!oaktrail_device) {pr_warn ("Unable to allocate platform device\n" ); ret = -ENOMEM ;drivers/platform/x86/mlx-platform.c +1
-1@@ -5181,7 +5181,7 @@ static int __init mlxplat_init(void)if (!dmi_check_system (mlxplat_dmi_table))return -ENODEV ; - mlxplat_dev =platform_device_register_simple (MLX_PLAT_DEVICE_NAME ,-1 , + mlxplat_dev =platform_device_register_simple (MLX_PLAT_DEVICE_NAME ,PLATFORM_DEVID_NONE , mlxplat_lpc_resources,ARRAY_SIZE (mlxplat_lpc_resources));drivers/platform/x86/msi-laptop.c +1
-1@@ -1066,7 +1066,7 @@ static int __init msi_init(void)/* Register platform stuff */ - msipf_device =platform_device_alloc ("msi-laptop-pf" ,-1 ); + msipf_device =platform_device_alloc ("msi-laptop-pf" ,PLATFORM_DEVID_NONE );if (!msipf_device) { ret = -ENOMEM ; goto fail_platform_driver;drivers/platform/x86/panasonic-laptop.c +1
-1@@ -1034,7 +1034,7 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)/* optical drive initialization */ if (ACPI_SUCCESS (check_optd_present ())) { pcc->platform =platform_device_register_simple ("panasonic" , --1 ,NULL ,0 ); +PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (pcc->platform)) { result =PTR_ERR (pcc->platform); goto out_backlight;drivers/platform/x86/samsung-laptop.c +1
-1@@ -1474,7 +1474,7 @@ static int __init samsung_platform_init(struct samsung_laptop *samsung) {struct platform_device *pdev; - pdev =platform_device_register_simple ("samsung" ,-1 ,NULL ,0 ); + pdev =platform_device_register_simple ("samsung" ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (pdev))return PTR_ERR (pdev);drivers/platform/x86/sony-laptop.c +1
-1@@ -584,7 +584,7 @@ static int sony_pf_add(void)if (ret) goto out; - sony_pf_device =platform_device_alloc ("sony-laptop" ,-1 ); + sony_pf_device =platform_device_alloc ("sony-laptop" ,PLATFORM_DEVID_NONE );if (!sony_pf_device) { ret = -ENOMEM ; goto out_platform_registered;drivers/platform/x86/tc1100-wmi.c +1
-1@@ -233,7 +233,7 @@ static int __init tc1100_init(void)if (!wmi_has_guid (GUID ))return -ENODEV ; - tc1100_device =platform_device_alloc ("tc1100-wmi" ,-1 ); + tc1100_device =platform_device_alloc ("tc1100-wmi" ,PLATFORM_DEVID_NONE );if (!tc1100_device)return -ENOMEM ;drivers/platform/x86/thinkpad_acpi.c +2
-2@@ -11715,7 +11715,7 @@ static int __init thinkpad_acpi_module_init(void) tp_features.quirks = dmi_id->driver_data;/* Device initialization */ - tpacpi_pdev =platform_device_register_simple (TPACPI_DRVR_NAME ,-1 , + tpacpi_pdev =platform_device_register_simple (TPACPI_DRVR_NAME ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (tpacpi_pdev)) { ret =PTR_ERR (tpacpi_pdev);@@ -11726,7 +11726,7 @@ static int __init thinkpad_acpi_module_init(void) } tpacpi_sensors_pdev =platform_device_register_simple (TPACPI_HWMON_DRVR_NAME , --1 ,NULL ,0 ); +PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (tpacpi_sensors_pdev)) { ret =PTR_ERR (tpacpi_sensors_pdev); tpacpi_sensors_pdev =NULL ;drivers/platform/x86/topstar-laptop.c +1
-1@@ -192,7 +192,7 @@ static int topstar_platform_init(struct topstar_laptop *topstar) {int err; - topstar->platform =platform_device_alloc (TOPSTAR_LAPTOP_CLASS ,-1 ); + topstar->platform =platform_device_alloc (TOPSTAR_LAPTOP_CLASS ,PLATFORM_DEVID_NONE );if (!topstar->platform)return -ENOMEM ;drivers/platform/x86/winmate-fm07-keys.c +1
-2@@ -161,7 +161,7 @@ static int __init fm07keys_init(void)return ret; } - dev =platform_device_register_simple (DRV_NAME ,-1 ,NULL ,0 ); + dev =platform_device_register_simple (DRV_NAME ,PLATFORM_DEVID_NONE ,NULL ,0 );if (IS_ERR (dev)) { ret =PTR_ERR (dev);pr_err ("fm07keys: failed to allocate device, err = %d\n" , ret); --2.37.3