diff options
author | Nathaniel McCallum <nathaniel@natemccallum.com> | 2009-11-18 20:11:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 11:55:20 -0800 |
commit | afe2dab4f6d32d5650aaba42f2c7ec9c0622f4dd (patch) | |
tree | b733d1e21f6482a46a262b25e15f4e628e74464b /tools/perf/builtin-stat.c | |
parent | c1479a92cf0a7792298d364e44a781550621cb58 (diff) | |
download | linux-afe2dab4f6d32d5650aaba42f2c7ec9c0622f4dd.tar.bz2 |
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>
Diffstat (limited to 'tools/perf/builtin-stat.c')
0 files changed, 0 insertions, 0 deletions