Skip to content

Commit

Permalink
pcmcia: fix incorrect argument order to list_add_tail()
Browse files Browse the repository at this point in the history
Commit a56bc69 fixed a wrong usage of
list_add_tail() within store_new_id() for PCI. Port the fix to PCMCIA,
which adapted this function from PCI.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Wolfram Sang authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent d598de0 commit b4b3d7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count)
if (!dynid)
return -ENOMEM;

INIT_LIST_HEAD(&dynid->node);
dynid->id.match_flags = match_flags;
dynid->id.manf_id = manf_id;
dynid->id.card_id = card_id;
Expand All @@ -246,7 +245,7 @@ pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count)
memcpy(dynid->id.prod_id_hash, prod_id_hash, sizeof(__u32) * 4);

spin_lock(&pdrv->dynids.lock);
list_add_tail(&pdrv->dynids.list, &dynid->node);
list_add_tail(&dynid->node, &pdrv->dynids.list);
spin_unlock(&pdrv->dynids.lock);

if (get_driver(&pdrv->drv)) {
Expand Down

0 comments on commit b4b3d7b

Please sign in to comment.