aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-05-29 23:31:03 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2006-05-29 23:31:03 -0400
commited8f9e2f047de5d9b791e390269f230a101a6a4b (patch)
tree8bca1bcd3159bf35c57cefe8efc76f24039de186 /drivers
parentd2f4012f15845761bd3c6f90172e53767c11e359 (diff)
Input: change from numbered to named switches
Remove the numbered SW_* entries from the input system and assign names to the existing users. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/keyboard/corgikbd.c12
-rw-r--r--drivers/input/keyboard/spitzkbd.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c
index 96c6bf77248a..1f0e720267d7 100644
--- a/drivers/input/keyboard/corgikbd.c
+++ b/drivers/input/keyboard/corgikbd.c
@@ -245,9 +245,9 @@ static void corgikbd_hinge_timer(unsigned long data)
245 if (hinge_count >= HINGE_STABLE_COUNT) { 245 if (hinge_count >= HINGE_STABLE_COUNT) {
246 spin_lock_irqsave(&corgikbd_data->lock, flags); 246 spin_lock_irqsave(&corgikbd_data->lock, flags);
247 247
248 input_report_switch(corgikbd_data->input, SW_0, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); 248 input_report_switch(corgikbd_data->input, SW_LID, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0));
249 input_report_switch(corgikbd_data->input, SW_1, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); 249 input_report_switch(corgikbd_data->input, SW_TABLET_MODE, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0));
250 input_report_switch(corgikbd_data->input, SW_2, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); 250 input_report_switch(corgikbd_data->input, SW_HEADPHONE_INSERT, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0));
251 input_sync(corgikbd_data->input); 251 input_sync(corgikbd_data->input);
252 252
253 spin_unlock_irqrestore(&corgikbd_data->lock, flags); 253 spin_unlock_irqrestore(&corgikbd_data->lock, flags);
@@ -340,9 +340,9 @@ static int __init corgikbd_probe(struct platform_device *pdev)
340 for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++) 340 for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++)
341 set_bit(corgikbd->keycode[i], input_dev->keybit); 341 set_bit(corgikbd->keycode[i], input_dev->keybit);
342 clear_bit(0, input_dev->keybit); 342 clear_bit(0, input_dev->keybit);
343 set_bit(SW_0, input_dev->swbit); 343 set_bit(SW_LID, input_dev->swbit);
344 set_bit(SW_1, input_dev->swbit); 344 set_bit(SW_TABLET_MODE, input_dev->swbit);
345 set_bit(SW_2, input_dev->swbit); 345 set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
346 346
347 input_register_device(corgikbd->input); 347 input_register_device(corgikbd->input);
348 348
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
index 1d238a9d52d6..c5d03fb77bcb 100644
--- a/drivers/input/keyboard/spitzkbd.c
+++ b/drivers/input/keyboard/spitzkbd.c
@@ -299,9 +299,9 @@ static void spitzkbd_hinge_timer(unsigned long data)
299 if (hinge_count >= HINGE_STABLE_COUNT) { 299 if (hinge_count >= HINGE_STABLE_COUNT) {
300 spin_lock_irqsave(&spitzkbd_data->lock, flags); 300 spin_lock_irqsave(&spitzkbd_data->lock, flags);
301 301
302 input_report_switch(spitzkbd_data->input, SW_0, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); 302 input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0));
303 input_report_switch(spitzkbd_data->input, SW_1, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); 303 input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0));
304 input_report_switch(spitzkbd_data->input, SW_2, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); 304 input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0));
305 input_sync(spitzkbd_data->input); 305 input_sync(spitzkbd_data->input);
306 306
307 spin_unlock_irqrestore(&spitzkbd_data->lock, flags); 307 spin_unlock_irqrestore(&spitzkbd_data->lock, flags);
@@ -398,9 +398,9 @@ static int __init spitzkbd_probe(struct platform_device *dev)
398 for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) 398 for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++)
399 set_bit(spitzkbd->keycode[i], input_dev->keybit); 399 set_bit(spitzkbd->keycode[i], input_dev->keybit);
400 clear_bit(0, input_dev->keybit); 400 clear_bit(0, input_dev->keybit);
401 set_bit(SW_0, input_dev->swbit); 401 set_bit(SW_LID, input_dev->swbit);
402 set_bit(SW_1, input_dev->swbit); 402 set_bit(SW_TABLET_MODE, input_dev->swbit);
403 set_bit(SW_2, input_dev->swbit); 403 set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
404 404
405 input_register_device(input_dev); 405 input_register_device(input_dev);
406 406