Re: [patch] [media] em28xx-cards: don't print a misleading message

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

 



Am 17.02.2014 21:04, schrieb Dan Carpenter:
> There were some missing curly braces so it always says that the transfer
> mode changed even if it didn't.

It's not a transfer mode change, it's the initial selection (which never
changes).
The intention of this section is to print which interface (type) is
choosen for analog video.
The same is done for digital video (DVB) a few lines later.
I think we should just switch from info to debug level.

>   Also the indenting uses spaces instead
> of tabs.
Yes, indenting is wrong and that's what causes the confusion here. ;-)

>
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>
> diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
> index 4d97a76cc3b0..e8eedd35eea5 100644
> --- a/drivers/media/usb/em28xx/em28xx-cards.c
> +++ b/drivers/media/usb/em28xx/em28xx-cards.c
> @@ -3329,10 +3329,11 @@ static int em28xx_usb_probe(struct usb_interface *interface,
>  
>  	/* Select USB transfer types to use */
>  	if (has_video) {
> -	    if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk))
> -		dev->analog_xfer_bulk = 1;
> -		em28xx_info("analog set to %s mode.\n",
> -			    dev->analog_xfer_bulk ? "bulk" : "isoc");
> +		if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk)) {
> +			dev->analog_xfer_bulk = 1;
> +			em28xx_info("analog set to %s mode.\n",
> +				    dev->analog_xfer_bulk ? "bulk" : "isoc");
Now you will never hit the "isoc" path.

Regards,
Frank

> +		}
>  	}
>  	if (has_dvb) {
>  	    if (!dev->dvb_ep_isoc || (try_bulk && dev->dvb_ep_bulk))
> --
> 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

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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux