diff options
Diffstat (limited to 'drivers/rtc/rtc-m48t59.c')
| -rw-r--r-- | drivers/rtc/rtc-m48t59.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index fcb03291f145..11880c1e9dac 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c | |||
| @@ -68,7 +68,7 @@ m48t59_mem_readb(struct device *dev, u32 ofs) | |||
| 68 | static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm) | 68 | static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm) |
| 69 | { | 69 | { |
| 70 | struct platform_device *pdev = to_platform_device(dev); | 70 | struct platform_device *pdev = to_platform_device(dev); |
| 71 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 71 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 72 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 72 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 73 | unsigned long flags; | 73 | unsigned long flags; |
| 74 | u8 val; | 74 | u8 val; |
| @@ -111,7 +111,7 @@ static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
| 111 | static int m48t59_rtc_set_time(struct device *dev, struct rtc_time *tm) | 111 | static int m48t59_rtc_set_time(struct device *dev, struct rtc_time *tm) |
| 112 | { | 112 | { |
| 113 | struct platform_device *pdev = to_platform_device(dev); | 113 | struct platform_device *pdev = to_platform_device(dev); |
| 114 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 114 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 115 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 115 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 116 | unsigned long flags; | 116 | unsigned long flags; |
| 117 | u8 val = 0; | 117 | u8 val = 0; |
| @@ -158,7 +158,7 @@ static int m48t59_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
| 158 | static int m48t59_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) | 158 | static int m48t59_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) |
| 159 | { | 159 | { |
| 160 | struct platform_device *pdev = to_platform_device(dev); | 160 | struct platform_device *pdev = to_platform_device(dev); |
| 161 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 161 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 162 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 162 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 163 | struct rtc_time *tm = &alrm->time; | 163 | struct rtc_time *tm = &alrm->time; |
| 164 | unsigned long flags; | 164 | unsigned long flags; |
| @@ -205,7 +205,7 @@ static int m48t59_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
| 205 | static int m48t59_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | 205 | static int m48t59_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) |
| 206 | { | 206 | { |
| 207 | struct platform_device *pdev = to_platform_device(dev); | 207 | struct platform_device *pdev = to_platform_device(dev); |
| 208 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 208 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 209 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 209 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 210 | struct rtc_time *tm = &alrm->time; | 210 | struct rtc_time *tm = &alrm->time; |
| 211 | u8 mday, hour, min, sec; | 211 | u8 mday, hour, min, sec; |
| @@ -266,7 +266,7 @@ static int m48t59_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
| 266 | static int m48t59_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) | 266 | static int m48t59_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) |
| 267 | { | 267 | { |
| 268 | struct platform_device *pdev = to_platform_device(dev); | 268 | struct platform_device *pdev = to_platform_device(dev); |
| 269 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 269 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 270 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 270 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 271 | unsigned long flags; | 271 | unsigned long flags; |
| 272 | 272 | ||
| @@ -283,7 +283,7 @@ static int m48t59_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
| 283 | static int m48t59_rtc_proc(struct device *dev, struct seq_file *seq) | 283 | static int m48t59_rtc_proc(struct device *dev, struct seq_file *seq) |
| 284 | { | 284 | { |
| 285 | struct platform_device *pdev = to_platform_device(dev); | 285 | struct platform_device *pdev = to_platform_device(dev); |
| 286 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 286 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 287 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 287 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 288 | unsigned long flags; | 288 | unsigned long flags; |
| 289 | u8 val; | 289 | u8 val; |
| @@ -304,7 +304,7 @@ static irqreturn_t m48t59_rtc_interrupt(int irq, void *dev_id) | |||
| 304 | { | 304 | { |
| 305 | struct device *dev = (struct device *)dev_id; | 305 | struct device *dev = (struct device *)dev_id; |
| 306 | struct platform_device *pdev = to_platform_device(dev); | 306 | struct platform_device *pdev = to_platform_device(dev); |
| 307 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 307 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 308 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 308 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 309 | u8 event; | 309 | u8 event; |
| 310 | 310 | ||
| @@ -340,7 +340,7 @@ static ssize_t m48t59_nvram_read(struct file *filp, struct kobject *kobj, | |||
| 340 | { | 340 | { |
| 341 | struct device *dev = container_of(kobj, struct device, kobj); | 341 | struct device *dev = container_of(kobj, struct device, kobj); |
| 342 | struct platform_device *pdev = to_platform_device(dev); | 342 | struct platform_device *pdev = to_platform_device(dev); |
| 343 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 343 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 344 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 344 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 345 | ssize_t cnt = 0; | 345 | ssize_t cnt = 0; |
| 346 | unsigned long flags; | 346 | unsigned long flags; |
| @@ -360,7 +360,7 @@ static ssize_t m48t59_nvram_write(struct file *filp, struct kobject *kobj, | |||
| 360 | { | 360 | { |
| 361 | struct device *dev = container_of(kobj, struct device, kobj); | 361 | struct device *dev = container_of(kobj, struct device, kobj); |
| 362 | struct platform_device *pdev = to_platform_device(dev); | 362 | struct platform_device *pdev = to_platform_device(dev); |
| 363 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 363 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 364 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); | 364 | struct m48t59_private *m48t59 = platform_get_drvdata(pdev); |
| 365 | ssize_t cnt = 0; | 365 | ssize_t cnt = 0; |
| 366 | unsigned long flags; | 366 | unsigned long flags; |
| @@ -385,7 +385,7 @@ static struct bin_attribute m48t59_nvram_attr = { | |||
| 385 | 385 | ||
| 386 | static int m48t59_rtc_probe(struct platform_device *pdev) | 386 | static int m48t59_rtc_probe(struct platform_device *pdev) |
| 387 | { | 387 | { |
| 388 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 388 | struct m48t59_plat_data *pdata = dev_get_platdata(&pdev->dev); |
| 389 | struct m48t59_private *m48t59 = NULL; | 389 | struct m48t59_private *m48t59 = NULL; |
| 390 | struct resource *res; | 390 | struct resource *res; |
| 391 | int ret = -ENOMEM; | 391 | int ret = -ENOMEM; |
