From 48eb18563cd8036976572066f7d8429414f03158 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Tue, 6 May 2008 12:11:39 -0400 Subject: [PATCH] --- yaml --- r: 104191 b: refs/heads/master c: ccd3474569a101914444dc37cc108eec22578999 h: refs/heads/master i: 104189: ab016236a4958e55d30cf860d9afa9c69573b278 104187: aaa5fe531c17632733de83b3b155f699edd91e2c 104183: 3638cbe8d8e8afdb860570cd8e4064fe27ecacce 104175: e6a053e8195ce93a44d8b68987e710c0a4042a82 104159: 8bd07952651504060b2227c93333ea7280231021 104127: aa3c63af1b2cda3b6004cf635381b1ada6ca2a9d 104063: c86afbccd6c7c2b4401a667d30f1d90466f02e1c 103935: 32b16df755fa7326ce519fc20410da55661c796d v: v3 --- [refs] | 2 +- trunk/drivers/input/serio/libps2.c | 52 ------------------------------ trunk/include/linux/libps2.h | 1 - 3 files changed, 1 insertion(+), 54 deletions(-) diff --git a/[refs] b/[refs] index addf0a180a39..a9b1fead2ca8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3e582db0783872a645f5236ef142be6579b300ad +refs/heads/master: ccd3474569a101914444dc37cc108eec22578999 diff --git a/trunk/drivers/input/serio/libps2.c b/trunk/drivers/input/serio/libps2.c index b819239d74dc..2b304c22c200 100644 --- a/trunk/drivers/input/serio/libps2.c +++ b/trunk/drivers/input/serio/libps2.c @@ -26,15 +26,6 @@ MODULE_AUTHOR("Dmitry Torokhov "); MODULE_DESCRIPTION("PS/2 driver library"); MODULE_LICENSE("GPL"); -/* Work structure to schedule execution of a command */ -struct ps2work { - struct work_struct work; - struct ps2dev *ps2dev; - int command; - unsigned char param[0]; -}; - - /* * ps2_sendbyte() sends a byte to the device and waits for acknowledge. * It doesn't handle retransmission, though it could - because if there @@ -245,49 +236,6 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) } EXPORT_SYMBOL(ps2_command); -/* - * ps2_execute_scheduled_command() sends a command, previously scheduled by - * ps2_schedule_command(), to a PS/2 device (keyboard, mouse, etc.) - */ - -static void ps2_execute_scheduled_command(struct work_struct *work) -{ - struct ps2work *ps2work = container_of(work, struct ps2work, work); - - ps2_command(ps2work->ps2dev, ps2work->param, ps2work->command); - kfree(ps2work); -} - -/* - * ps2_schedule_command() allows to schedule delayed execution of a PS/2 - * command and can be used to issue a command from an interrupt or softirq - * context. - */ - -int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int command) -{ - struct ps2work *ps2work; - int send = (command >> 12) & 0xf; - int receive = (command >> 8) & 0xf; - - if (!(ps2work = kmalloc(sizeof(struct ps2work) + max(send, receive), GFP_ATOMIC))) - return -1; - - memset(ps2work, 0, sizeof(struct ps2work)); - ps2work->ps2dev = ps2dev; - ps2work->command = command; - memcpy(ps2work->param, param, send); - INIT_WORK(&ps2work->work, ps2_execute_scheduled_command); - - if (!schedule_work(&ps2work->work)) { - kfree(ps2work); - return -1; - } - - return 0; -} -EXPORT_SYMBOL(ps2_schedule_command); - /* * ps2_init() initializes ps2dev structure */ diff --git a/trunk/include/linux/libps2.h b/trunk/include/linux/libps2.h index f6f301e2b0f5..afc413369101 100644 --- a/trunk/include/linux/libps2.h +++ b/trunk/include/linux/libps2.h @@ -43,7 +43,6 @@ void ps2_init(struct ps2dev *ps2dev, struct serio *serio); int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout); void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout); int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command); -int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int command); int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data); int ps2_handle_response(struct ps2dev *ps2dev, unsigned char data); void ps2_cmd_aborted(struct ps2dev *ps2dev);