[PATCH] Fix prctl privilege escalation and suid_dumpable (CVE-2006-2451)
[pandora-kernel.git] / drivers / pcmcia / omap_cf.c
index 94be9e5..420e10a 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/delay.h>
@@ -218,7 +218,7 @@ static int __init omap_cf_probe(struct device *dev)
 
        /* either CFLASH.IREQ (INT_1610_CF) or some GPIO */
        irq = platform_get_irq(pdev, 0);
-       if (!irq)
+       if (irq < 0)
                return -EINVAL;
 
        cf = kcalloc(1, sizeof *cf, GFP_KERNEL);
@@ -232,7 +232,7 @@ static int __init omap_cf_probe(struct device *dev)
        dev_set_drvdata(dev, cf);
 
        /* this primarily just shuts up irq handling noise */
-       status = request_irq(irq, omap_cf_irq, SA_SHIRQ,
+       status = request_irq(irq, omap_cf_irq, IRQF_SHARED,
                        driver_name, cf);
        if (status < 0)
                goto fail0;
@@ -329,27 +329,13 @@ static int __devexit omap_cf_remove(struct device *dev)
        return 0;
 }
 
-static int omap_cf_suspend(struct device *dev, pm_message_t mesg, u32 level)
-{
-       if (level != SUSPEND_SAVE_STATE)
-               return 0;
-       return pcmcia_socket_dev_suspend(dev, mesg);
-}
-
-static int omap_cf_resume(struct device *dev, u32 level)
-{
-       if (level != RESUME_RESTORE_STATE)
-               return 0;
-       return pcmcia_socket_dev_resume(dev);
-}
-
 static struct device_driver omap_cf_driver = {
        .name           = (char *) driver_name,
        .bus            = &platform_bus_type,
        .probe          = omap_cf_probe,
        .remove         = __devexit_p(omap_cf_remove),
-       .suspend        = omap_cf_suspend,
-       .resume         = omap_cf_resume,
+       .suspend        = pcmcia_socket_dev_suspend,
+       .resume         = pcmcia_socket_dev_resume,
 };
 
 static int __init omap_cf_init(void)