lkml.org 
[lkml]   [2018]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
>

\
 
 \ /
  Last update: 2018-08-06 21:10    [W:0.055 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site