We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 780e220 commit 142887eCopy full SHA for 142887e
drivers/thermal/broadcom/bcm2835_thermal.c
@@ -167,7 +167,6 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
167
const struct of_device_id *match;
168
struct thermal_zone_device *tz;
169
struct bcm2835_thermal_data *data;
170
- struct resource *res;
171
int err = 0;
172
u32 val;
173
unsigned long rate;
@@ -181,8 +180,7 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
181
180
if (!match)
182
return -EINVAL;
183
184
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
185
- data->regs = devm_ioremap_resource(&pdev->dev, res);
+ data->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
186
if (IS_ERR(data->regs)) {
187
err = PTR_ERR(data->regs);
188
return err;
0 commit comments