|
@@ -151,6 +151,7 @@ static int __init ep93xx_rtc_probe(struct platform_device *pdev)
|
|
return -ENXIO;
|
|
return -ENXIO;
|
|
|
|
|
|
pdev->dev.platform_data = ep93xx_rtc;
|
|
pdev->dev.platform_data = ep93xx_rtc;
|
|
|
|
+ platform_set_drvdata(pdev, rtc);
|
|
|
|
|
|
rtc = rtc_device_register(pdev->name,
|
|
rtc = rtc_device_register(pdev->name,
|
|
&pdev->dev, &ep93xx_rtc_ops, THIS_MODULE);
|
|
&pdev->dev, &ep93xx_rtc_ops, THIS_MODULE);
|
|
@@ -159,8 +160,6 @@ static int __init ep93xx_rtc_probe(struct platform_device *pdev)
|
|
goto exit;
|
|
goto exit;
|
|
}
|
|
}
|
|
|
|
|
|
- platform_set_drvdata(pdev, rtc);
|
|
|
|
-
|
|
|
|
err = sysfs_create_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files);
|
|
err = sysfs_create_group(&pdev->dev.kobj, &ep93xx_rtc_sysfs_files);
|
|
if (err)
|
|
if (err)
|
|
goto fail;
|
|
goto fail;
|
|
@@ -168,9 +167,9 @@ static int __init ep93xx_rtc_probe(struct platform_device *pdev)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
fail:
|
|
fail:
|
|
- platform_set_drvdata(pdev, NULL);
|
|
|
|
rtc_device_unregister(rtc);
|
|
rtc_device_unregister(rtc);
|
|
exit:
|
|
exit:
|
|
|
|
+ platform_set_drvdata(pdev, NULL);
|
|
pdev->dev.platform_data = NULL;
|
|
pdev->dev.platform_data = NULL;
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|