File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -627,14 +627,16 @@ static int __init cros_ec_lpc_init(void)
627
627
{
628
628
int ret ;
629
629
acpi_status status ;
630
+ const struct dmi_system_id * dmi_match ;
630
631
631
632
status = acpi_get_devices (ACPI_DRV_NAME , cros_ec_lpc_parse_device ,
632
633
& cros_ec_lpc_acpi_device_found , NULL );
633
634
if (ACPI_FAILURE (status ))
634
635
pr_warn (DRV_NAME ": Looking for %s failed\n" , ACPI_DRV_NAME );
635
636
636
- if (!cros_ec_lpc_acpi_device_found &&
637
- !dmi_check_system (cros_ec_lpc_dmi_table )) {
637
+ dmi_match = dmi_first_match (cros_ec_lpc_dmi_table );
638
+
639
+ if (!cros_ec_lpc_acpi_device_found && !dmi_match ) {
638
640
pr_err (DRV_NAME ": unsupported system.\n" );
639
641
return - ENODEV ;
640
642
}
@@ -647,6 +649,9 @@ static int __init cros_ec_lpc_init(void)
647
649
}
648
650
649
651
if (!cros_ec_lpc_acpi_device_found ) {
652
+ /* Pass the DMI match's driver data down to the platform device */
653
+ platform_set_drvdata (& cros_ec_lpc_device , dmi_match -> driver_data );
654
+
650
655
/* Register the device, and it'll get hooked up automatically */
651
656
ret = platform_device_register (& cros_ec_lpc_device );
652
657
if (ret ) {
You can’t perform that action at this time.
0 commit comments