public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Harry Geyer <harry.geyer@devtank.co.uk>
Cc: Till Harbaum <till@harbaum.org>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: tiny-usb: check usb base class before assuming the interface on device is for this driver
Date: Thu, 27 Jul 2023 13:30:29 +0200	[thread overview]
Message-ID: <20230727113029.ckrxe4qmy2nznh4e@intel.intel> (raw)
In-Reply-To: <20230727083354.4903-1-harry.geyer@devtank.co.uk>

Hi Harry,

On Thu, Jul 27, 2023 at 09:33:54AM +0100, Harry Geyer wrote:
> Patch allows usb devices with multiple interfaces to use this driver without
> this driver assuming all interfaces are i2c-tiny-usb.
> 
> Signed-off-by: Harry Geyer <harry.geyer@devtank.co.uk>
> ---
>  drivers/i2c/busses/i2c-tiny-usb.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c
> index d1fa9ff5aeab..d6578e8908ac 100644
> --- a/drivers/i2c/busses/i2c-tiny-usb.c
> +++ b/drivers/i2c/busses/i2c-tiny-usb.c
> @@ -222,6 +222,9 @@ static int i2c_tiny_usb_probe(struct usb_interface *interface,
>  	int retval = -ENOMEM;
>  	u16 version;
>  
> +	if (interface->intf_assoc && interface->intf_assoc->bFunctionClass != USB_CLASS_VENDOR_SPEC)

I'm sorry, I meant the same column, my bad here!
Would you please be so kind to resend it as


	if (interface->intf_assoc &&
	    interface->intf_assoc->bFunctionClass != USB_CLASS_VENDOR_SPEC)

It's a nitpick, though.

On the other hand, checkpatch is OK with lines up to 100
characters and this one looks like it's withing that length. So,
up to your personal preference.

If you resend it, you can add my r-b.

Thank you and again, sorry,
Andi

PS Next time, please add a changelog and a versioning to
   following patches.

> +		return -ENODEV;
> +
>  	dev_dbg(&interface->dev, "probing usb device\n");
>  
>  	/* allocate memory for our device state and initialize it */
> -- 
> 2.34.1
> 

  reply	other threads:[~2023-07-27 11:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27  8:33 [PATCH] i2c: tiny-usb: check usb base class before assuming the interface on device is for this driver Harry Geyer
2023-07-27 11:30 ` Andi Shyti [this message]
2023-07-27 13:54   ` Harry Geyer
2023-07-27 16:00     ` Andi Shyti
  -- strict thread matches above, loose matches on Subject: below --
2023-07-27 16:22 Harry Geyer
2023-07-27 17:13 ` Andi Shyti
2023-08-02 20:02 ` Andi Shyti
2023-08-14 13:17   ` Wolfram Sang
2023-07-19 11:38 Harry Geyer
2023-07-26 16:08 ` Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230727113029.ckrxe4qmy2nznh4e@intel.intel \
    --to=andi.shyti@kernel.org \
    --cc=harry.geyer@devtank.co.uk \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=till@harbaum.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox