diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-01 02:55:20 -0500 |
commit | 35858adbfca13678af99fb31618ef4428d6dedb0 (patch) | |
tree | 3336feaa61324486945816cb52c347733e7c0821 /drivers/input/misc | |
parent | 197d4db752e67160d79fed09968c2140376a80a3 (diff) | |
parent | 4b70858ba8d4537daf782defebe5f2ff80ccef2b (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/apanel.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/bfin_rotary.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/pcspkr.c | 2 | ||||
-rw-r--r-- | drivers/input/misc/rotary_encoder.c | 14 | ||||
-rw-r--r-- | drivers/input/misc/uinput.c | 4 |
5 files changed, 18 insertions, 6 deletions
diff --git a/drivers/input/misc/apanel.c b/drivers/input/misc/apanel.c index 71b82434264d..a8d2b8db4e35 100644 --- a/drivers/input/misc/apanel.c +++ b/drivers/input/misc/apanel.c | |||
@@ -149,7 +149,7 @@ static void apanel_shutdown(struct i2c_client *client) | |||
149 | apanel_remove(client); | 149 | apanel_remove(client); |
150 | } | 150 | } |
151 | 151 | ||
152 | static struct i2c_device_id apanel_id[] = { | 152 | static const struct i2c_device_id apanel_id[] = { |
153 | { "fujitsu_apanel", 0 }, | 153 | { "fujitsu_apanel", 0 }, |
154 | { } | 154 | { } |
155 | }; | 155 | }; |
diff --git a/drivers/input/misc/bfin_rotary.c b/drivers/input/misc/bfin_rotary.c index 690f3fafa03b..61d10177fa83 100644 --- a/drivers/input/misc/bfin_rotary.c +++ b/drivers/input/misc/bfin_rotary.c | |||
@@ -247,7 +247,7 @@ static int bfin_rotary_resume(struct device *dev) | |||
247 | return 0; | 247 | return 0; |
248 | } | 248 | } |
249 | 249 | ||
250 | static struct dev_pm_ops bfin_rotary_pm_ops = { | 250 | static const struct dev_pm_ops bfin_rotary_pm_ops = { |
251 | .suspend = bfin_rotary_suspend, | 251 | .suspend = bfin_rotary_suspend, |
252 | .resume = bfin_rotary_resume, | 252 | .resume = bfin_rotary_resume, |
253 | }; | 253 | }; |
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c index 21cb755a54fb..ea4e1fd12651 100644 --- a/drivers/input/misc/pcspkr.c +++ b/drivers/input/misc/pcspkr.c | |||
@@ -127,7 +127,7 @@ static void pcspkr_shutdown(struct platform_device *dev) | |||
127 | pcspkr_event(NULL, EV_SND, SND_BELL, 0); | 127 | pcspkr_event(NULL, EV_SND, SND_BELL, 0); |
128 | } | 128 | } |
129 | 129 | ||
130 | static struct dev_pm_ops pcspkr_pm_ops = { | 130 | static const struct dev_pm_ops pcspkr_pm_ops = { |
131 | .suspend = pcspkr_suspend, | 131 | .suspend = pcspkr_suspend, |
132 | }; | 132 | }; |
133 | 133 | ||
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c index 3b9f588fc747..4ae07935985e 100644 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c | |||
@@ -152,6 +152,13 @@ static int __devinit rotary_encoder_probe(struct platform_device *pdev) | |||
152 | goto exit_unregister_input; | 152 | goto exit_unregister_input; |
153 | } | 153 | } |
154 | 154 | ||
155 | err = gpio_direction_input(pdata->gpio_a); | ||
156 | if (err) { | ||
157 | dev_err(&pdev->dev, "unable to set GPIO %d for input\n", | ||
158 | pdata->gpio_a); | ||
159 | goto exit_unregister_input; | ||
160 | } | ||
161 | |||
155 | err = gpio_request(pdata->gpio_b, DRV_NAME); | 162 | err = gpio_request(pdata->gpio_b, DRV_NAME); |
156 | if (err) { | 163 | if (err) { |
157 | dev_err(&pdev->dev, "unable to request GPIO %d\n", | 164 | dev_err(&pdev->dev, "unable to request GPIO %d\n", |
@@ -159,6 +166,13 @@ static int __devinit rotary_encoder_probe(struct platform_device *pdev) | |||
159 | goto exit_free_gpio_a; | 166 | goto exit_free_gpio_a; |
160 | } | 167 | } |
161 | 168 | ||
169 | err = gpio_direction_input(pdata->gpio_b); | ||
170 | if (err) { | ||
171 | dev_err(&pdev->dev, "unable to set GPIO %d for input\n", | ||
172 | pdata->gpio_b); | ||
173 | goto exit_free_gpio_a; | ||
174 | } | ||
175 | |||
162 | /* request the IRQs */ | 176 | /* request the IRQs */ |
163 | err = request_irq(encoder->irq_a, &rotary_encoder_irq, | 177 | err = request_irq(encoder->irq_a, &rotary_encoder_irq, |
164 | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE, | 178 | IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE, |
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index d3f57245420a..1477466076ad 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/smp_lock.h> | ||
38 | #include <linux/fs.h> | 37 | #include <linux/fs.h> |
39 | #include <linux/miscdevice.h> | 38 | #include <linux/miscdevice.h> |
40 | #include <linux/uinput.h> | 39 | #include <linux/uinput.h> |
@@ -284,7 +283,6 @@ static int uinput_open(struct inode *inode, struct file *file) | |||
284 | if (!newdev) | 283 | if (!newdev) |
285 | return -ENOMEM; | 284 | return -ENOMEM; |
286 | 285 | ||
287 | lock_kernel(); | ||
288 | mutex_init(&newdev->mutex); | 286 | mutex_init(&newdev->mutex); |
289 | spin_lock_init(&newdev->requests_lock); | 287 | spin_lock_init(&newdev->requests_lock); |
290 | init_waitqueue_head(&newdev->requests_waitq); | 288 | init_waitqueue_head(&newdev->requests_waitq); |
@@ -292,7 +290,7 @@ static int uinput_open(struct inode *inode, struct file *file) | |||
292 | newdev->state = UIST_NEW_DEVICE; | 290 | newdev->state = UIST_NEW_DEVICE; |
293 | 291 | ||
294 | file->private_data = newdev; | 292 | file->private_data = newdev; |
295 | unlock_kernel(); | 293 | nonseekable_open(inode, file); |
296 | 294 | ||
297 | return 0; | 295 | return 0; |
298 | } | 296 | } |