gta01_battery: fix unloading bug
authorPaul Fertser <fercerpav@gmail.com>
Sun, 26 Jul 2009 13:56:54 +0000 (17:56 +0400)
committerPaul Fertser <fercerpav@gmail.com>
Sun, 2 Aug 2009 07:24:27 +0000 (11:24 +0400)
Driver data must be properly registered after allocation

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
drivers/power/gta01_battery.c

index 81a0fe7..5b1a6c9 100644 (file)
@@ -76,6 +76,7 @@ static int gta01_battery_probe(struct platform_device *pdev)
        gta01_bat->psy.external_power_changed = gta01_bat_ext_changed;
 
        gta01_bat->pdata = pdev->dev.platform_data;
+       platform_set_drvdata(pdev, gta01_bat);
        power_supply_register(&pdev->dev, &gta01_bat->psy);
 
        return 0;