madc: populate madc->dev to avoid a crash
[pandora-kernel.git] / 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;