aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp/isapnp')
-rw-r--r--drivers/pnp/isapnp/core.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index 3a326f9305f6..883577a93d6a 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -840,16 +840,14 @@ static int __init isapnp_build_device_list(void)
840 header[5], header[6], header[7], header[8]); 840 header[5], header[6], header[7], header[8]);
841 printk(KERN_DEBUG "checksum = 0x%x\n", checksum); 841 printk(KERN_DEBUG "checksum = 0x%x\n", checksum);
842#endif 842#endif
843 if ((card =
844 kzalloc(sizeof(struct pnp_card), GFP_KERNEL)) == NULL)
845 continue;
846
847 card->number = csn;
848 INIT_LIST_HEAD(&card->devices);
849 eisa_id = header[0] | header[1] << 8 | 843 eisa_id = header[0] | header[1] << 8 |
850 header[2] << 16 | header[3] << 24; 844 header[2] << 16 | header[3] << 24;
851 pnp_eisa_id_to_string(eisa_id, id); 845 pnp_eisa_id_to_string(eisa_id, id);
852 pnp_add_card_id(card, id); 846 card = pnp_alloc_card(&isapnp_protocol, csn, id);
847 if (!card)
848 continue;
849
850 INIT_LIST_HEAD(&card->devices);
853 card->serial = 851 card->serial =
854 (header[7] << 24) | (header[6] << 16) | (header[5] << 8) | 852 (header[7] << 24) | (header[6] << 16) | (header[5] << 8) |
855 header[4]; 853 header[4];
@@ -860,7 +858,6 @@ static int __init isapnp_build_device_list(void)
860 "isapnp: checksum for device %i is not valid (0x%x)\n", 858 "isapnp: checksum for device %i is not valid (0x%x)\n",
861 csn, isapnp_checksum_value); 859 csn, isapnp_checksum_value);
862 card->checksum = isapnp_checksum_value; 860 card->checksum = isapnp_checksum_value;
863 card->protocol = &isapnp_protocol;
864 861
865 pnp_add_card(card); 862 pnp_add_card(card);
866 } 863 }