[PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers [ver #3]

2015-02-17 Thread David Howells
Use enum to represent table offsets rather than hard-coding numbers to avoid problems with the numbers becoming out of sync with the table. Signed-off-by: David Howells --- drivers/media/usb/dvb-usb/cxusb.c | 155 ++--- 1 file changed, 111 insertions(+), 44 dele

Re: [PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers

2015-02-17 Thread Mauro Carvalho Chehab
Em Tue, 17 Feb 2015 13:45:50 + David Howells escreveu: > Mauro Carvalho Chehab wrote: > > > I would do a s/ix_USB_PID_// in the above, in order to simplify the > > namespace and to avoid giving the false impression that those are vendor > > IDs. > > Okay. > > > If you look below on your p

[PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers [ver #2]

2015-02-17 Thread David Howells
Use enum to represent table offsets rather than hard-coding numbers to avoid problems with the numbers becoming out of sync with the table. Signed-off-by: David Howells --- drivers/media/usb/dvb-usb/cxusb.c | 113 +++-- 1 file changed, 69 insertions(+), 44 delet

Re: [PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers

2015-02-17 Thread David Howells
David Howells wrote: > That should really be: > > [VID_MEDION_MD95700] = {USB_VID_MEDION, USB_PID_MEDION_MD95700}, > > since the index number is the model, not the vendor, which brings me to: > > [DVICO_BLUEBIRD_DVB_T_NANO_2_NFW_WARM] = {USB_VID_DVICO, > USB_PID_DVICO_BLUEBIRD_DVB

Re: [PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers

2015-02-17 Thread David Howells
Mauro Carvalho Chehab wrote: > I would do a s/ix_USB_PID_// in the above, in order to simplify the > namespace and to avoid giving the false impression that those are vendor > IDs. Okay. > If you look below on your patch, even you forgot to add a "ix_" prefix into > one of the entires ;) Bah.

Re: [PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers

2015-02-17 Thread Mauro Carvalho Chehab
Em Mon, 16 Feb 2015 15:33:07 + David Howells escreveu: > Use enum to represent table offsets rather than hard-coding numbers to avoid > problems with the numbers becoming out of sync with the table. > > Signed-off-by: David Howells > --- > > drivers/media/usb/dvb-usb/cxusb.c | 115 >

[PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers

2015-02-16 Thread David Howells
Use enum to represent table offsets rather than hard-coding numbers to avoid problems with the numbers becoming out of sync with the table. Signed-off-by: David Howells --- drivers/media/usb/dvb-usb/cxusb.c | 115 +++-- 1 file changed, 71 insertions(+), 44 delet