* Re: [PATCH] Fix tsx210x detection
[not found] <20080306005848.GA20807@party>
@ 2008-03-13 11:31 ` Tony Lindgren
0 siblings, 0 replies; only message in thread
From: Tony Lindgren @ 2008-03-13 11:31 UTC (permalink / raw)
To: Kyungmin Park; +Cc: linux-omap
* Kyungmin Park <kyungmin.park@samsung.com> [080306 02:59]:
> If the return value is all 0xff, it means there's no device.
>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> diff --git a/drivers/spi/tsc210x.c b/drivers/spi/tsc210x.c
> index df8bcf9..1d2ac94 100644
> --- a/drivers/spi/tsc210x.c
> +++ b/drivers/spi/tsc210x.c
> @@ -1092,6 +1092,11 @@ static int tsc210x_probe(struct spi_device *spi, enum tsc_type type)
> dev_dbg(&dev->spi->dev, "revision, err %d\n", err);
> goto err_spi;
> }
> + if (reg == 0xffff) {
> + err = -ENODEV;
> + dev_dbg(&dev->spi->dev, "no device, err %d\n", err);
> + goto err_spi;
> + }
> dev_info(&spi->dev, "rev %d, irq %d\n", reg & 0x0007, spi->irq);
>
> err = tsc210x_configure(dev);
Pushing today.
Tony
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-13 11:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080306005848.GA20807@party>
2008-03-13 11:31 ` [PATCH] Fix tsx210x detection Tony Lindgren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.