Re: [PATCH v1 2/2] serial: 8250_pci: Share WCH IDs with parport_serial driver

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

 



On Wed, Dec 04, 2024 at 08:14:42AM +0100, Jiri Slaby wrote:
> On 04. 12. 24, 4:09, Andy Shevchenko wrote:
> > parport_serial driver uses subset of WCH IDs that are present in 8250_pci.
> > Share them via pci_ids.h and switch parport_serial to use defined constants.

> >   	{ 0x1409, 0x7168, 0x1409, 0xd079, 0, 0, timedia_9079c },
> >   	/* WCH CARDS */
> > -	{ 0x4348, 0x5053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, wch_ch353_1s1p},
> > -	{ 0x4348, 0x7053, 0x4348, 0x3253, 0, 0, wch_ch353_2s1p},
> > -	{ 0x1c00, 0x3050, 0x1c00, 0x3050, 0, 0, wch_ch382_0s1p},
> > -	{ 0x1c00, 0x3250, 0x1c00, 0x3250, 0, 0, wch_ch382_2s1p},
> > +	{ PCI_VENDOR_ID_WCHCN, PCI_DEVICE_ID_WCHCN_CH353_1S1P,
> > +	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, wch_ch353_1s1p },
> > +	{ PCI_VENDOR_ID_WCHCN, PCI_DEVICE_ID_WCHCN_CH353_2S1P,
> > +	  0x4348, 0x3253, 0, 0, wch_ch353_2s1p },
> > +	{ PCI_VENDOR_ID_WCHIC, PCI_DEVICE_ID_WCHIC_CH382_0S1P,
> > +	  0x1c00, 0x3050, 0, 0, wch_ch382_0s1p },
> > +	{ PCI_VENDOR_ID_WCHIC, PCI_DEVICE_ID_WCHIC_CH382_2S1P,
> > +	  0x1c00, 0x3250, 0, 0, wch_ch382_2s1p },
> 
> I know this is the current pattern in the file. But what about using
> PCI_DEVICE_DATA() for the first and PCI_DEVICE_SUB() + .driver_data for the
> rest? Otherwise it occurs as a load of incomprehensible constants.

I can issue an additional patch, I was really thinking about this, but decided
to go the above way as it seems logical and moving to mentioned macros sounds
like unrelated to the point of the change.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux