aha/scripts/mod
Nathaniel McCallum afe2dab4f6 USB: add hex/bcd detection to usb modalias generation
The current code to generate usb modaliases from usb_device_id assumes
that the device's bcdDevice descriptor will actually be in BCD format.
While this should be a sane assumption, some devices don't follow spec
and just use plain old hex.  This causes drivers for these devices to
generate invalid modalias lines which will never actually match for the
hardware.

The following patch adds hex support for bcdDevice in file2alias.c by
detecting when a driver uses a hex formatted bcdDevice_(lo|hi) and
adjusts the output to hex format accordingly.

Drivers for devices which have bcdDevice conforming to BCD will have no
change in modalias output.  Drivers for devices which don't conform
(i.e. ibmcam) should now generate valid modaliases.

EXAMPLE OUTPUT (ibmcam; space added to highlight change)
    Old: usb:v0545p800D d030[10-9] dc*dsc*dp*ic*isc*ip*
    New: usb:v0545p800D d030a      dc*dsc*dp*ic*isc*ip*

Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 11:55:20 -08:00
..
.gitignore
empty.c
file2alias.c USB: add hex/bcd detection to usb modalias generation 2009-12-11 11:55:20 -08:00
Makefile
mk_elfconfig.c remove the v850 port 2008-07-24 10:47:24 -07:00
modpost.c Fix all -Wmissing-prototypes warnings in x86 defconfig 2009-09-23 07:39:28 -07:00
modpost.h kbuild: soften modpost checks when doing cross builds 2008-03-23 21:38:54 +01:00
sumversion.c trivial: remove references to non-existent include/linux/config.h 2009-09-21 15:14:52 +02:00