@@ -67,7 +67,7 @@ MODULE_PARM_DESC(hw_changes_brightness,
67
67
static bool device_id_scheme = false;
68
68
module_param (device_id_scheme , bool , 0444 );
69
69
70
- static int only_lcd = -1 ;
70
+ static int only_lcd ;
71
71
module_param (only_lcd , int , 0444 );
72
72
73
73
static bool may_report_brightness_keys ;
@@ -1713,12 +1713,12 @@ static void acpi_video_dev_register_backlight(struct acpi_video_device *device)
1713
1713
return ;
1714
1714
count ++ ;
1715
1715
1716
- acpi_get_parent (device -> dev -> handle , & acpi_parent );
1717
-
1718
- pdev = acpi_get_pci_dev ( acpi_parent );
1719
- if ( pdev ) {
1720
- parent = & pdev -> dev ;
1721
- pci_dev_put ( pdev );
1716
+ if ( ACPI_SUCCESS ( acpi_get_parent (device -> dev -> handle , & acpi_parent ))) {
1717
+ pdev = acpi_get_pci_dev ( acpi_parent );
1718
+ if ( pdev ) {
1719
+ parent = & pdev -> dev ;
1720
+ pci_dev_put ( pdev ) ;
1721
+ }
1722
1722
}
1723
1723
1724
1724
memset (& props , 0 , sizeof (struct backlight_properties ));
@@ -2137,57 +2137,6 @@ static int __init intel_opregion_present(void)
2137
2137
return opregion ;
2138
2138
}
2139
2139
2140
- /* Check if the chassis-type indicates there is no builtin LCD panel */
2141
- static bool dmi_is_desktop (void )
2142
- {
2143
- const char * chassis_type ;
2144
- unsigned long type ;
2145
-
2146
- chassis_type = dmi_get_system_info (DMI_CHASSIS_TYPE );
2147
- if (!chassis_type )
2148
- return false;
2149
-
2150
- if (kstrtoul (chassis_type , 10 , & type ) != 0 )
2151
- return false;
2152
-
2153
- switch (type ) {
2154
- case 0x03 : /* Desktop */
2155
- case 0x04 : /* Low Profile Desktop */
2156
- case 0x05 : /* Pizza Box */
2157
- case 0x06 : /* Mini Tower */
2158
- case 0x07 : /* Tower */
2159
- case 0x10 : /* Lunch Box */
2160
- case 0x11 : /* Main Server Chassis */
2161
- return true;
2162
- }
2163
-
2164
- return false;
2165
- }
2166
-
2167
- /*
2168
- * We're seeing a lot of bogus backlight interfaces on newer machines
2169
- * without a LCD such as desktops, servers and HDMI sticks. Checking the
2170
- * lcd flag fixes this, enable this by default on any machines which are:
2171
- * 1. Win8 ready (where we also prefer the native backlight driver, so
2172
- * normally the acpi_video code should not register there anyways); *and*
2173
- * 2.1 Report a desktop/server DMI chassis-type, or
2174
- * 2.2 Are an ACPI-reduced-hardware platform (and thus won't use the EC for
2175
- backlight control)
2176
- */
2177
- static bool should_check_lcd_flag (void )
2178
- {
2179
- if (!acpi_osi_is_win8 ())
2180
- return false;
2181
-
2182
- if (dmi_is_desktop ())
2183
- return true;
2184
-
2185
- if (acpi_reduced_hardware ())
2186
- return true;
2187
-
2188
- return false;
2189
- }
2190
-
2191
2140
int acpi_video_register (void )
2192
2141
{
2193
2142
int ret = 0 ;
@@ -2201,9 +2150,6 @@ int acpi_video_register(void)
2201
2150
goto leave ;
2202
2151
}
2203
2152
2204
- if (only_lcd == -1 )
2205
- only_lcd = should_check_lcd_flag ();
2206
-
2207
2153
dmi_check_system (video_dmi_table );
2208
2154
2209
2155
ret = acpi_bus_register_driver (& acpi_video_bus );
0 commit comments