RE: [PATCH] Input: serio: make HYPERV_KEYBOARD depend on SERIO_I8042=y

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Dmitry Torokhov
> > How about this:
> > in libps2.c let's add  and export a function pointer
> > i8042_lock_chip_if_port_owner: it is used to replace the current
> > 	if (i8042_check_port_owner(ps2dev->serio))
> > 		i8042_lock_chip();
> > The function pointer has a default value NULL, and in i8042.c: i8042_init()
> > we set the function pointer if an i8042 device is found?
> 
> Hmm, that would make i8042 depend on libps2, which might be OK, but how
> do you deal with the locking here? I.e. what happens if you unload i8042
> right when we go through this sequence?
Ok, I got it.

> Maybe we need to split i8042_lock_chip() and friends into a separate
> module that always loads, even if i8042 is not present.
> Dmitry
Good idea!

However the more difficult thing is 
i8042_check_port_owner() -- used by  libps2.c too.
Then  the separate module will also have to include and EXPORT
	DEFINE_SPINLOCK(i8042_lock);
	struct i8042_port i8042_ports[I8042_NUM_PORTS];
?

This seems a non-trivial change... :-(

Thanks,
-- Dexuan
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux