|
@@ -139,12 +139,13 @@ static int __devinit max6902_probe(struct spi_device *spi)
|
|
if (IS_ERR(rtc))
|
|
if (IS_ERR(rtc))
|
|
return PTR_ERR(rtc);
|
|
return PTR_ERR(rtc);
|
|
|
|
|
|
|
|
+ dev_set_drvdata(&spi->dev, rtc);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
static int __devexit max6902_remove(struct spi_device *spi)
|
|
static int __devexit max6902_remove(struct spi_device *spi)
|
|
{
|
|
{
|
|
- struct rtc_device *rtc = platform_get_drvdata(spi);
|
|
|
|
|
|
+ struct rtc_device *rtc = dev_get_drvdata(&spi->dev);
|
|
|
|
|
|
rtc_device_unregister(rtc);
|
|
rtc_device_unregister(rtc);
|
|
return 0;
|
|
return 0;
|