Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
[pandora-kernel.git] / drivers / input / keyboard / sh_keysc.c
index 429ac2b..834cf98 100644 (file)
@@ -231,7 +231,8 @@ static int __devinit sh_keysc_probe(struct platform_device *pdev)
        input->keycodesize = sizeof(pdata->keycodes[0]);
        input->keycodemax = ARRAY_SIZE(pdata->keycodes);
 
-       error = request_irq(irq, sh_keysc_isr, 0, pdev->name, pdev);
+       error = request_threaded_irq(irq, NULL, sh_keysc_isr, IRQF_ONESHOT,
+                                    dev_name(&pdev->dev), pdev);
        if (error) {
                dev_err(&pdev->dev, "failed to request IRQ\n");
                goto err3;
@@ -290,6 +291,7 @@ static int __devexit sh_keysc_remove(struct platform_device *pdev)
        return 0;
 }
 
+#if CONFIG_PM_SLEEP
 static int sh_keysc_suspend(struct device *dev)
 {
        struct platform_device *pdev = to_platform_device(dev);
@@ -322,13 +324,12 @@ static int sh_keysc_resume(struct device *dev)
 
        return 0;
 }
+#endif
 
-static const struct dev_pm_ops sh_keysc_dev_pm_ops = {
-       .suspend = sh_keysc_suspend,
-       .resume = sh_keysc_resume,
-};
+static SIMPLE_DEV_PM_OPS(sh_keysc_dev_pm_ops,
+                        sh_keysc_suspend, sh_keysc_resume);
 
-struct platform_driver sh_keysc_device_driver = {
+static struct platform_driver sh_keysc_device_driver = {
        .probe          = sh_keysc_probe,
        .remove         = __devexit_p(sh_keysc_remove),
        .driver         = {