[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180806190912.GJ9372@lunn.ch>
Date: Mon, 6 Aug 2018 21:09:12 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Kosta Zertsekel <zertsekel@...il.com>
Cc: Mark Brown <broonie@...nel.org>, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jan Kundrát <jan.kundrat@...net.cz>,
Stefan Roese <sr@...x.de>, Ken Wilson <ken.wilson@...ngear.com>
Subject: Re: [PATCH] spi: orion: cosmetics - alias long direct_access
variables
> @@ -683,6 +683,7 @@ static int orion_spi_probe(struct platform_device *pdev)
>
> /* Scan all SPI devices of this controller for direct mapped devices */
> for_each_available_child_of_node(pdev->dev.of_node, np) {
> + struct orion_direct_acc *dacc;
I would prefer direct_access, but it looks like this is too long to
put the devm_ioremap on one line. But it should be enough to fix the
odd indentation of r->start and PAGE_SIZE.
Andrew
> u32 cs;
>
> /* Get chip-select number from the "reg" property */
> @@ -711,14 +712,13 @@ static int orion_spi_probe(struct platform_device *pdev)
> * This needs to get extended for the direct SPI-NOR / SPI-NAND
> * support, once this gets implemented.
> */
> - spi->child[cs].direct_access.vaddr = devm_ioremap(&pdev->dev,
> - r->start,
> - PAGE_SIZE);
> - if (!spi->child[cs].direct_access.vaddr) {
> + dacc = &spi->child[cs].direct_access;
> + dacc->vaddr = devm_ioremap(&pdev->dev, r->start, PAGE_SIZE);
> + if (!dacc->vaddr) {
> status = -ENOMEM;
> goto out_rel_axi_clk;
> }
> - spi->child[cs].direct_access.size = PAGE_SIZE;
> + dacc->size = PAGE_SIZE;
>
> dev_info(&pdev->dev, "CS%d configured for direct access\n", cs);
> }
> --
> 2.17.1
>
Powered by blists - more mailing lists