[parisc-linux-cvs] Bugfix for parisc_hardware_description
John Marvin
jsm@udlkern.fc.hp.com
Wed, 5 Sep 2001 06:54:05 -0600 (MDT)
This patch fixes a bug in parisc_hardware_description. Note that
listptr->name is a char array, not a pointer, so it would never
be null.
--- hardware.c.old Fri Aug 31 04:26:35 2001
+++ hardware.c Fri Aug 31 04:28:35 2001
@@ -1332,7 +1332,7 @@ static struct hp_hardware hp_hardware_li
{HPHW_OTHER, 0x004, 0x00034, 0x00, "Slave"},
{HPHW_OTHER, 0x004, 0x00038, 0x00, "EDU"},
{HPHW_OTHER, 0x004, 0x00049, 0x00, "LGB Control"},
- {0, } /* leave the last entry empty ! */
+ {HPHW_FAULTY, 0, } /* Special Marker for last entry */
};
@@ -1439,7 +1439,7 @@ parisc_hardware_description(struct paris
{
struct hp_hardware *listptr;
- for (listptr = hp_hardware_list; listptr->name; listptr++) {
+ for (listptr = hp_hardware_list; listptr->hw_type != HPHW_FAULTY; listptr++) {
if ((listptr->hw_type == id->hw_type) &&
(listptr->hversion == id->hversion) &&
(listptr->sversion == id->sversion)){