Re: [PATCH 3/4] em28xx-i2c: do not map -ENXIO errors to -ENODEV for empty i2c transfers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Sun, 19 Jan 2014 22:48:36 +0100
Frank Schäfer <fschaefer.oss@xxxxxxxxxxxxxx> escreveu:

> Commit e63b009d6e "" changed the error codes i2c ACK errors from -ENODEV to -ENXIO.
> But it also introduced a line that maps -ENXIO back to -ENODEV in case of empty i2c
> messages, which makes no sense, because
> 1.) an ACK error is an ACK error no matter what the i2c message content is
> 2.) -ENXIO is perfectly suited for probing, too

I don't agree with this patch. 0-byte messages are only usin during device
probe.

> 3.) we are loosing the ability to distinguish USB device disconnects

Huh?

> 
> Signed-off-by: Frank Schäfer <fschaefer.oss@xxxxxxxxxxxxxx>
> ---
>  drivers/media/usb/em28xx/em28xx-i2c.c |    1 -
>  1 Datei geändert, 1 Zeile entfernt(-)
> 
> diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c
> index ba6433c..a26d7d4 100644
> --- a/drivers/media/usb/em28xx/em28xx-i2c.c
> +++ b/drivers/media/usb/em28xx/em28xx-i2c.c
> @@ -539,7 +539,6 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
>  				if (rc == -ENXIO) {
>  					if (i2c_debug > 1)
>  						printk(KERN_CONT " no device\n");
> -					rc = -ENODEV;
>  				} else {
>  					if (i2c_debug > 1)
>  						printk(KERN_CONT " ERROR: %i\n", rc);


-- 

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux