Commit a7426a0e authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'samsung-soc-5.8' of...

Merge tag 'samsung-soc-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc

Samsung mach/soc changes for v5.8

Cleanups and code simplifying.

* tag 'samsung-soc-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  ARM: samsung: Use devm_platform_ioremap_resource() to simplify code
  ARM: samsung: Omit superfluous error message in s3c_adc_probe()
  ARM: s3c64xx: convert to use i2c_new_client_device()

Link: https://lore.kernel.org/r/20200512122922.5700-3-krzk@kernel.orgSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 3418b4c2 06b29212
...@@ -405,10 +405,9 @@ static int wlf_gf_module_probe(struct i2c_client *i2c, ...@@ -405,10 +405,9 @@ static int wlf_gf_module_probe(struct i2c_client *i2c,
gf_mods[i].name, rev + 1); gf_mods[i].name, rev + 1);
for (j = 0; j < gf_mods[i].num_i2c_devs; j++) { for (j = 0; j < gf_mods[i].num_i2c_devs; j++) {
if (!i2c_new_device(i2c->adapter, if (IS_ERR(i2c_new_client_device(i2c->adapter,
&(gf_mods[i].i2c_devs[j]))) &(gf_mods[i].i2c_devs[j]))))
dev_err(&i2c->dev, dev_err(&i2c->dev, "Failed to register\n");
"Failed to register dev: %d\n", ret);
} }
spi_register_board_info(gf_mods[i].spi_devs, spi_register_board_info(gf_mods[i].spi_devs,
......
...@@ -333,7 +333,6 @@ static int s3c_adc_probe(struct platform_device *pdev) ...@@ -333,7 +333,6 @@ static int s3c_adc_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct adc_device *adc; struct adc_device *adc;
struct resource *regs;
enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data; enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data;
int ret; int ret;
unsigned tmp; unsigned tmp;
...@@ -354,10 +353,8 @@ static int s3c_adc_probe(struct platform_device *pdev) ...@@ -354,10 +353,8 @@ static int s3c_adc_probe(struct platform_device *pdev)
} }
adc->irq = platform_get_irq(pdev, 1); adc->irq = platform_get_irq(pdev, 1);
if (adc->irq <= 0) { if (adc->irq <= 0)
dev_err(dev, "failed to get adc irq\n");
return -ENOENT; return -ENOENT;
}
ret = devm_request_irq(dev, adc->irq, s3c_adc_irq, 0, dev_name(dev), ret = devm_request_irq(dev, adc->irq, s3c_adc_irq, 0, dev_name(dev),
adc); adc);
...@@ -372,8 +369,7 @@ static int s3c_adc_probe(struct platform_device *pdev) ...@@ -372,8 +369,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
return PTR_ERR(adc->clk); return PTR_ERR(adc->clk);
} }
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); adc->regs = devm_platform_ioremap_resource(pdev, 0);
adc->regs = devm_ioremap_resource(dev, regs);
if (IS_ERR(adc->regs)) if (IS_ERR(adc->regs))
return PTR_ERR(adc->regs); return PTR_ERR(adc->regs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment