diff options
Diffstat (limited to 'drivers/rtc/rtc-m48t86.c')
-rw-r--r-- | drivers/rtc/rtc-m48t86.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c index 2d30314fa07f..32f64c942621 100644 --- a/drivers/rtc/rtc-m48t86.c +++ b/drivers/rtc/rtc-m48t86.c | |||
@@ -46,7 +46,7 @@ static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) | |||
46 | { | 46 | { |
47 | unsigned char reg; | 47 | unsigned char reg; |
48 | struct platform_device *pdev = to_platform_device(dev); | 48 | struct platform_device *pdev = to_platform_device(dev); |
49 | struct m48t86_ops *ops = pdev->dev.platform_data; | 49 | struct m48t86_ops *ops = dev_get_platdata(&pdev->dev); |
50 | 50 | ||
51 | reg = ops->readbyte(M48T86_REG_B); | 51 | reg = ops->readbyte(M48T86_REG_B); |
52 | 52 | ||
@@ -84,7 +84,7 @@ static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
84 | { | 84 | { |
85 | unsigned char reg; | 85 | unsigned char reg; |
86 | struct platform_device *pdev = to_platform_device(dev); | 86 | struct platform_device *pdev = to_platform_device(dev); |
87 | struct m48t86_ops *ops = pdev->dev.platform_data; | 87 | struct m48t86_ops *ops = dev_get_platdata(&pdev->dev); |
88 | 88 | ||
89 | reg = ops->readbyte(M48T86_REG_B); | 89 | reg = ops->readbyte(M48T86_REG_B); |
90 | 90 | ||
@@ -123,7 +123,7 @@ static int m48t86_rtc_proc(struct device *dev, struct seq_file *seq) | |||
123 | { | 123 | { |
124 | unsigned char reg; | 124 | unsigned char reg; |
125 | struct platform_device *pdev = to_platform_device(dev); | 125 | struct platform_device *pdev = to_platform_device(dev); |
126 | struct m48t86_ops *ops = pdev->dev.platform_data; | 126 | struct m48t86_ops *ops = dev_get_platdata(&pdev->dev); |
127 | 127 | ||
128 | reg = ops->readbyte(M48T86_REG_B); | 128 | reg = ops->readbyte(M48T86_REG_B); |
129 | 129 | ||
@@ -147,7 +147,7 @@ static const struct rtc_class_ops m48t86_rtc_ops = { | |||
147 | static int m48t86_rtc_probe(struct platform_device *dev) | 147 | static int m48t86_rtc_probe(struct platform_device *dev) |
148 | { | 148 | { |
149 | unsigned char reg; | 149 | unsigned char reg; |
150 | struct m48t86_ops *ops = dev->dev.platform_data; | 150 | struct m48t86_ops *ops = dev_get_platdata(&dev->dev); |
151 | struct rtc_device *rtc; | 151 | struct rtc_device *rtc; |
152 | 152 | ||
153 | rtc = devm_rtc_device_register(&dev->dev, "m48t86", | 153 | rtc = devm_rtc_device_register(&dev->dev, "m48t86", |