Arjen de Korte
2008-Nov-24 13:24 UTC
[Nut-upsdev] [nut-commits] svn commit r1578 - in trunk: . drivers
Citeren Arjen de Korte <adkorte-guest at alioth.debian.org>:> Author: adkorte-guest > Date: Mon Nov 24 13:13:44 2008 > New Revision: 1578 > > Log: > Use new usb_device_id_t and is_usb_device_supported() > for selection of the subdriver.Alexander, It would be nice if you could double check that I didn't horribly break something here. I don't expect any surprises here, but one never knows. Best regards, Arjen -- Please keep list traffic on the list
Arnaud Quette
2008-Nov-24 15:46 UTC
[Nut-upsdev] [nut-commits] svn commit r1578 - in trunk: . drivers
Hi Arjen just a comment about the Vendor / Product IDs declaration... 2008/11/24 Arjen de Korte <adkorte-guest at alioth.debian.org>:> Author: adkorte-guest > Date: Mon Nov 24 13:13:44 2008 > New Revision: 1578 > > Log: > Use new usb_device_id_t and is_usb_device_supported() > for selection of the subdriver. > > Unclutter is_usb_device_supported(). >... > - > -/* Agiler */ > -#define AGILER_VENDORID 0x05b8 > -/* Krauler (non compliant IDs) */ > -#define KRAULER_VENDORID 0x0001 > -/* Ablerex (non compliant IDs) */ > -#define ABLEREX_VENDORID 0xffff > -/* Belkin */ > -#define BELKIN_VENDORID 0x0665 > -/* Mustek */ > -#define MUSTEK_VENDORID 0x06da > -/* Unitek */ > -#define UNITEK_VENDORID 0x0f03 > - > /* list of all known devices */ > - > -/* FIXME: move into usb_device_id */ > -static usb_ups_t KnownDevices[] = { > +static usb_device_id_t megatec_usb_id[] = { > /* Agiler UPS */ > - { USB_DEVICE(AGILER_VENDORID, 0x0000), &agiler_subdriver}, > + { USB_DEVICE(0x05b8, 0x0000), &agiler_subdriver},the use of defines for VendorID is due to the fact that that way, we can extract the comment on the line before the #define (Vendor Name, ex Agiler), and keep the one above the device declaration (USB_DEVICE...) for the device (ex Agiler UPS). though that's purely informative and cosmetic, it may be useful... cheers, Arnaud