madc: populate madc->dev to avoid a crash
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 12 Aug 2009 08:54:57 +0000 (11:54 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 7 Oct 2009 10:49:10 +0000 (13:49 +0300)
drivers/i2c/chips/twl4030-madc.c

index c17c7fe..64d7fe2 100644 (file)
@@ -439,6 +439,7 @@ static int __init twl4030_madc_probe(struct platform_device *pdev)
                goto err_pdata;
        }
 
+       madc->dev = &pdev->dev;
        madc->imr = (pdata->irq_line == 1) ? TWL4030_MADC_IMR1 : TWL4030_MADC_IMR2;
        madc->isr = (pdata->irq_line == 1) ? TWL4030_MADC_ISR1 : TWL4030_MADC_ISR2;