.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Dallas DS1216 RTC driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
136 | 137 | |
---|
137 | 138 | static int __init ds1216_rtc_probe(struct platform_device *pdev) |
---|
138 | 139 | { |
---|
139 | | - struct resource *res; |
---|
140 | 140 | struct ds1216_priv *priv; |
---|
141 | 141 | u8 dummy[8]; |
---|
142 | 142 | |
---|
.. | .. |
---|
146 | 146 | |
---|
147 | 147 | platform_set_drvdata(pdev, priv); |
---|
148 | 148 | |
---|
149 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
150 | | - priv->ioaddr = devm_ioremap_resource(&pdev->dev, res); |
---|
| 149 | + priv->ioaddr = devm_platform_ioremap_resource(pdev, 0); |
---|
151 | 150 | if (IS_ERR(priv->ioaddr)) |
---|
152 | 151 | return PTR_ERR(priv->ioaddr); |
---|
153 | 152 | |
---|