#ifdef CONFIG_DMI
static int __init dmi_enable_osi_darwin(const struct dmi_system_id *d)
{
- acpi_dmi_osi_darwin(1, d); /* enable */
+ acpi_dmi_osi_darwin(true, d); /* enable */
return 0;
}
static int __init dmi_enable_osi_linux(const struct dmi_system_id *d)
{
- acpi_dmi_osi_linux(1, d); /* enable */
+ acpi_dmi_osi_linux(true, d); /* enable */
return 0;
}
static int __init dmi_disable_osi_vista(const struct dmi_system_id *d)
}
}
-static void __init set_osi_darwin(unsigned int enable)
+static void __init set_osi_darwin(bool enable)
{
- if (osi_config.darwin_enable != enable)
- osi_config.darwin_enable = enable;
-
+ osi_config.darwin_enable = !!enable;
if (enable) {
acpi_osi_setup("!");
acpi_osi_setup("Darwin");
}
}
-static void __init acpi_cmdline_osi_darwin(unsigned int enable)
+static void __init acpi_cmdline_osi_darwin(bool enable)
{
/* cmdline set the default and override DMI */
osi_config.darwin_cmdline = 1;
return;
}
-void __init acpi_dmi_osi_darwin(int enable, const struct dmi_system_id *d)
+void __init acpi_dmi_osi_darwin(bool enable, const struct dmi_system_id *d)
{
printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
- if (enable == -1)
- return;
-
/* DMI knows that this box asks OSI(Darwin) */
osi_config.darwin_dmi = 1;
set_osi_darwin(enable);
return;
}
-static void __init set_osi_linux(unsigned int enable)
+static void __init set_osi_linux(bool enable)
{
- if (osi_config.linux_enable != enable)
- osi_config.linux_enable = enable;
-
- if (osi_config.linux_enable)
+ osi_config.linux_enable = !!enable;
+ if (enable)
acpi_osi_setup("Linux");
else
acpi_osi_setup("!Linux");
return;
}
-static void __init acpi_cmdline_osi_linux(unsigned int enable)
+static void __init acpi_cmdline_osi_linux(bool enable)
{
/* cmdline set the default and override DMI */
osi_config.linux_cmdline = 1;
return;
}
-void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d)
+void __init acpi_dmi_osi_linux(bool enable, const struct dmi_system_id *d)
{
printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
- if (enable == -1)
- return;
-
/* DMI knows that this box asks OSI(Linux) */
osi_config.linux_dmi = 1;
set_osi_linux(enable);
static int __init osi_setup(char *str)
{
if (str && !strcmp("Linux", str))
- acpi_cmdline_osi_linux(1);
+ acpi_cmdline_osi_linux(true);
else if (str && !strcmp("!Linux", str))
- acpi_cmdline_osi_linux(0);
+ acpi_cmdline_osi_linux(false);
else if (str && !strcmp("Darwin", str))
- acpi_cmdline_osi_darwin(1);
+ acpi_cmdline_osi_darwin(true);
else if (str && !strcmp("!Darwin", str))
- acpi_cmdline_osi_darwin(0);
+ acpi_cmdline_osi_darwin(false);
else
acpi_osi_setup(str);
extern char acpi_video_backlight_string[];
extern long acpi_is_video_device(acpi_handle handle);
extern int acpi_blacklisted(void);
-extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);
-extern void acpi_dmi_osi_darwin(int enable, const struct dmi_system_id *d);
+extern void acpi_dmi_osi_linux(bool enable, const struct dmi_system_id *d);
+extern void acpi_dmi_osi_darwin(bool enable, const struct dmi_system_id *d);
extern void acpi_osi_setup(char *str);
extern bool acpi_osi_is_win8(void);