Skip to content

Commit

Permalink
Merge tag 'sunxi-drivers-for-5.16-1' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/sunxi/linux into arm/drivers

Some new drivers changes for the Allwinner SoCs, converting to a helper
and improving logging.

* tag 'sunxi-drivers-for-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  bus: sun50i-de2: Adjust printing error message
  soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource()

Link: https://lore.kernel.org/r/ad0aa469-9e1b-4bb6-a116-92648ed774fa.lettre@localhost
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Oct 20, 2021
2 parents 4a47ce1 + 50ac48a commit 409d8a9
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 3 additions & 4 deletions drivers/bus/sun50i-de2.c
Original file line number Diff line number Diff line change
@@ -15,10 +15,9 @@ static int sun50i_de2_bus_probe(struct platform_device *pdev)
int ret;

ret = sunxi_sram_claim(&pdev->dev);
if (ret) {
dev_err(&pdev->dev, "Error couldn't map SRAM to device\n");
return ret;
}
if (ret)
return dev_err_probe(&pdev->dev, ret,
"Couldn't map SRAM to device\n");

of_platform_populate(np, NULL, NULL, &pdev->dev);

4 changes: 1 addition & 3 deletions drivers/soc/sunxi/sunxi_sram.c
Original file line number Diff line number Diff line change
@@ -331,7 +331,6 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = {

static int sunxi_sram_probe(struct platform_device *pdev)
{
struct resource *res;
struct dentry *d;
struct regmap *emac_clock;
const struct sunxi_sramc_variant *variant;
@@ -342,8 +341,7 @@ static int sunxi_sram_probe(struct platform_device *pdev)
if (!variant)
return -EINVAL;

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);

0 comments on commit 409d8a9

Please sign in to comment.