[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOoeyxV=tziXgDKZr+deGpm5xjNiHgd5ykW04=JT6ESnBN7Xmg@mail.gmail.com>
Date: Fri, 25 Oct 2024 16:02:57 +0800
From: Ming Yu <a0282524688@...il.com>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: tmyu0@...oton.com, lee@...nel.org, linus.walleij@...aro.org, brgl@...ev.pl,
andi.shyti@...nel.org, mailhol.vincent@...adoo.fr, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
wim@...ux-watchdog.org, linux@...ck-us.net, jdelvare@...e.com,
jic23@...nel.org, lars@...afoo.de, ukleinek@...nel.org,
alexandre.belloni@...tlin.com, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-i2c@...r.kernel.org,
linux-can@...r.kernel.org, netdev@...r.kernel.org,
linux-watchdog@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-iio@...r.kernel.org, linux-pwm@...r.kernel.org,
linux-rtc@...r.kernel.org
Subject: Re: [PATCH v1 1/9] mfd: Add core driver for Nuvoton NCT6694
Sorry, resending this email in plain text format.
Marc Kleine-Budde <mkl@...gutronix.de> 於 2024年10月24日 週四 下午5:57寫道:
>
> On 24.10.2024 16:59:14, Ming Yu wrote:
> > +static int nct6694_usb_probe(struct usb_interface *iface,
> > + const struct usb_device_id *id)
> > +{
> > + struct usb_device *udev = interface_to_usbdev(iface);
> > + struct device *dev = &udev->dev;
> > + struct usb_host_interface *interface;
> > + struct usb_endpoint_descriptor *int_endpoint;
> > + struct nct6694 *nct6694;
> > + int pipe, maxp, bulk_pipe;
> > + int ret = EINVAL;
> > +
> > + interface = iface->cur_altsetting;
> > + /* Binding interface class : 0xFF */
> > + if (interface->desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC ||
> > + interface->desc.bInterfaceSubClass != 0x00 ||
> > + interface->desc.bInterfaceProtocol != 0x00)
> > + return -ENODEV;
>
> I think you can use USB_DEVICE_INFO() and remove this manual check
>
> https://elixir.bootlin.com/linux/v6.11.5/source/include/linux/usb.h#L1056
>
> [...]
[Ming] Okay! I'll remove it and change USB_DEVICE()
to USB_DEVICE_AND_INTERFACE_INFO().
>
> > +
> > +static const struct usb_device_id nct6694_ids[] = {
> > + { USB_DEVICE(NCT6694_VENDOR_ID, NCT6694_PRODUCT_ID)},
> > + {},
> > +};
> > +MODULE_DEVICE_TABLE(usb, nct6694_ids);
>
> regards,
> Marc
>
> --
> Pengutronix e.K. | Marc Kleine-Budde |
> Embedded Linux | https://www.pengutronix.de |
> Vertretung Nürnberg | Phone: +49-5121-206917-129 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Powered by blists - more mailing lists