lkml.org 
[lkml]   [2008]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [spi-devel-general] [PATCH 2/6] [Blackfin] SPI driver: Use SPI device name to do gpio peripheral request
On Jan 31, 2008 5:48 AM, David Brownell <david-b@pacbell.net> wrote:
> On Wednesday 30 January 2008, Bryan Wu wrote:
> > When got some gpio conflict, it is easy to know which SPI device driver not just got "bfin-spi"
> >
> > Signed-off-by: Bryan Wu <bryan.wu@analog.com>
> > ---
> > drivers/spi/spi_bfin5xx.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
> > index 8fd1365..c3f9ed4 100644
> > --- a/drivers/spi/spi_bfin5xx.c
> > +++ b/drivers/spi/spi_bfin5xx.c
> > @@ -1176,7 +1176,7 @@ static int setup(struct spi_device *spi)
> > if ((chip->chip_select_num > 0)
> > && (chip->chip_select_num <= spi->master->num_chipselect))
> > peripheral_request(ssel[spi->master->bus_num]
> > - [chip->chip_select_num-1], DRV_NAME);
> > + [chip->chip_select_num-1], spi->modalias);
>
> Better: spi->dev.bus_id (always unique) not spi->modalias (isn't) ...
>

spi->dev.bus_id is just number, while spi->modalias usually is a
string name which it is more meaningful.
In most time, modalias is easier for us to locate the gpio conflict.

Thanks
-Bryan Wu


\
 
 \ /
  Last update: 2008-01-31 04:15    [W:0.051 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site