lkml.org 
[lkml]   [2019]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH 2/2] r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2
    Date
    Kai-Heng Feng [mailto:kai.heng.feng@canonical.com]
    > Sent: Monday, October 28, 2019 12:58 PM
    [...]
    > >> @@ -6754,6 +6779,8 @@ static const struct usb_device_id rtl8152_table[]
    > = {
    > >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f, 0)},
    > >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062, 0)},
    > >> {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3069, 0)},
    > >> + {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3082,
    > >> + R8152_QUIRK_LENOVO_MACPASSTHRU)},
    > >
    > > This limits the usage of driver_info. For example, I couldn't
    > > use it to store a pointer address anymore.
    >
    > But will the driver ever use .driver_info for pointers?
    > There are many driver use it for quirks and quirks only.

    I prefer to keep .driver_info empty, even though it is not
    used currently.

    The R8152_QUIRK_LENOVO_MACPASSTHRU is only used to set the
    flag of LENOVO_MACPASSTHRU in probe(), and it is used only once.
    Besides, it could be replaced by checking the vendor ID and
    product ID. Therefore, I don't think it is necessary to use
    driver_info , unless there are more devices needing it.

    Best Regards,
    Hayes


    \
     
     \ /
      Last update: 2019-10-28 10:22    [W:3.972 / U:0.640 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site