X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Finput%2Fserio%2Fhp_sdc.c;h=0d395979b2d19c2a35ddb31e6d8c915c363fcfd9;hb=4fb8af10d0fd09372d52966b76922b9e82bbc950;hp=6af199805ffc420ecfa3cce67e18ba054ed3e648;hpb=a3d52136ee8f7399859f9a0824470fd49b1d1a00;p=linux-2.6 diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c index 6af199805f..0d395979b2 100644 --- a/drivers/input/serio/hp_sdc.c +++ b/drivers/input/serio/hp_sdc.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -104,6 +105,10 @@ EXPORT_SYMBOL(__hp_sdc_enqueue_transaction); EXPORT_SYMBOL(hp_sdc_enqueue_transaction); EXPORT_SYMBOL(hp_sdc_dequeue_transaction); +static unsigned int hp_sdc_disabled; +module_param_named(no_hpsdc, hp_sdc_disabled, bool, 0); +MODULE_PARM_DESC(no_hpsdc, "Do not enable HP SDC driver."); + static hp_i8042_sdc hp_sdc; /* All driver state is kept in here. */ /*************** primitives for use in any context *********************/ @@ -944,11 +949,7 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d) #endif /* __hppa__ */ -#if !defined(__mc68000__) /* Link error on m68k! */ -static void __exit hp_sdc_exit(void) -#else static void hp_sdc_exit(void) -#endif { write_lock_irq(&hp_sdc.lock); @@ -983,6 +984,11 @@ static int __init hp_sdc_register(void) unsigned char i; #endif + if (hp_sdc_disabled) { + printk(KERN_WARNING PREFIX "HP SDC driver disabled by no_hpsdc=1.\n"); + return -ENODEV; + } + hp_sdc.dev = NULL; hp_sdc.dev_err = 0; #if defined(__hppa__)