Skip to content

Commit

Permalink
Input: i8042 - use boolean type where it makes sense
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Sep 11, 2009
1 parent 5ddbc77 commit 386b384
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 70 deletions.
38 changes: 19 additions & 19 deletions drivers/input/serio/i8042-x86ia64io.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,9 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = {
#ifdef CONFIG_PNP
#include <linux/pnp.h>

static int i8042_pnp_kbd_registered;
static bool i8042_pnp_kbd_registered;
static unsigned int i8042_pnp_kbd_devices;
static int i8042_pnp_aux_registered;
static bool i8042_pnp_aux_registered;
static unsigned int i8042_pnp_aux_devices;

static int i8042_pnp_command_reg;
Expand Down Expand Up @@ -640,25 +640,25 @@ static struct pnp_driver i8042_pnp_aux_driver = {
static void i8042_pnp_exit(void)
{
if (i8042_pnp_kbd_registered) {
i8042_pnp_kbd_registered = 0;
i8042_pnp_kbd_registered = false;
pnp_unregister_driver(&i8042_pnp_kbd_driver);
}

if (i8042_pnp_aux_registered) {
i8042_pnp_aux_registered = 0;
i8042_pnp_aux_registered = false;
pnp_unregister_driver(&i8042_pnp_aux_driver);
}
}

static int __init i8042_pnp_init(void)
{
char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 };
int pnp_data_busted = 0;
int pnp_data_busted = false;
int err;

#ifdef CONFIG_X86
if (dmi_check_system(i8042_dmi_nopnp_table))
i8042_nopnp = 1;
i8042_nopnp = true;
#endif

if (i8042_nopnp) {
Expand All @@ -668,11 +668,11 @@ static int __init i8042_pnp_init(void)

err = pnp_register_driver(&i8042_pnp_kbd_driver);
if (!err)
i8042_pnp_kbd_registered = 1;
i8042_pnp_kbd_registered = true;

err = pnp_register_driver(&i8042_pnp_aux_driver);
if (!err)
i8042_pnp_aux_registered = 1;
i8042_pnp_aux_registered = true;

if (!i8042_pnp_kbd_devices && !i8042_pnp_aux_devices) {
i8042_pnp_exit();
Expand Down Expand Up @@ -700,9 +700,9 @@ static int __init i8042_pnp_init(void)

#if defined(__ia64__)
if (!i8042_pnp_kbd_devices)
i8042_nokbd = 1;
i8042_nokbd = true;
if (!i8042_pnp_aux_devices)
i8042_noaux = 1;
i8042_noaux = true;
#endif

if (((i8042_pnp_data_reg & ~0xf) == (i8042_data_reg & ~0xf) &&
Expand All @@ -713,7 +713,7 @@ static int __init i8042_pnp_init(void)
"using default %#x\n",
i8042_pnp_data_reg, i8042_data_reg);
i8042_pnp_data_reg = i8042_data_reg;
pnp_data_busted = 1;
pnp_data_busted = true;
}

if (((i8042_pnp_command_reg & ~0xf) == (i8042_command_reg & ~0xf) &&
Expand All @@ -724,15 +724,15 @@ static int __init i8042_pnp_init(void)
"using default %#x\n",
i8042_pnp_command_reg, i8042_command_reg);
i8042_pnp_command_reg = i8042_command_reg;
pnp_data_busted = 1;
pnp_data_busted = true;
}

if (!i8042_nokbd && !i8042_pnp_kbd_irq) {
printk(KERN_WARNING
"PNP: PS/2 controller doesn't have KBD irq; "
"using default %d\n", i8042_kbd_irq);
i8042_pnp_kbd_irq = i8042_kbd_irq;
pnp_data_busted = 1;
pnp_data_busted = true;
}

if (!i8042_noaux && !i8042_pnp_aux_irq) {
Expand All @@ -741,7 +741,7 @@ static int __init i8042_pnp_init(void)
"PNP: PS/2 appears to have AUX port disabled, "
"if this is incorrect please boot with "
"i8042.nopnp\n");
i8042_noaux = 1;
i8042_noaux = true;
} else {
printk(KERN_WARNING
"PNP: PS/2 controller doesn't have AUX irq; "
Expand Down Expand Up @@ -788,21 +788,21 @@ static int __init i8042_platform_init(void)
return retval;

#if defined(__ia64__)
i8042_reset = 1;
i8042_reset = true;
#endif

#ifdef CONFIG_X86
if (dmi_check_system(i8042_dmi_reset_table))
i8042_reset = 1;
i8042_reset = true;

if (dmi_check_system(i8042_dmi_noloop_table))
i8042_noloop = 1;
i8042_noloop = true;

if (dmi_check_system(i8042_dmi_nomux_table))
i8042_nomux = 1;
i8042_nomux = true;

if (dmi_check_system(i8042_dmi_dritek_table))
i8042_dritek = 1;
i8042_dritek = true;
#endif /* CONFIG_X86 */

return retval;
Expand Down
Loading

0 comments on commit 386b384

Please sign in to comment.