mtd/drivers/mtd/devices block2mtd.c,1.15,1.16
joern at infradead.org
joern at infradead.org
Wed Dec 22 08:12:01 EST 2004
Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/home/joern/mtd/drivers/mtd/devices
Modified Files:
block2mtd.c
Log Message:
Change some list.h calls.
Index: block2mtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/block2mtd.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- block2mtd.c 22 Dec 2004 13:11:36 -0000 1.15
+++ block2mtd.c 22 Dec 2004 13:11:58 -0000 1.16
@@ -412,12 +412,11 @@
dev->mtd.priv = dev;
dev->mtd.owner = THIS_MODULE;
- list_add(&dev->list, &blkmtd_device_list);
if (add_mtd_device(&dev->mtd)) {
/* Device didnt get added, so free the entry */
- list_del(&dev->list);
goto devinit_err;
}
+ list_add(&dev->list, &blkmtd_device_list);
INFO("mtd%d: [%s] erase_size = %dKiB [%ld]", dev->mtd.index,
dev->mtd.name + strlen("blkmtd: "),
dev->mtd.erasesize >> 10, PAGE_SIZE);
@@ -546,12 +545,11 @@
static void __devexit blockmtd_exit(void)
{
- struct list_head *temp1, *temp2;
+ struct list_head *pos, *next;
/* Remove the MTD devices */
- list_for_each_safe(temp1, temp2, &blkmtd_device_list) {
- struct blkmtd_dev *dev = list_entry(temp1, struct blkmtd_dev,
- list);
+ list_for_each_safe(pos, next, &blkmtd_device_list) {
+ struct blkmtd_dev *dev = list_entry(pos, typeof(*dev), list);
blockmtd_sync(&dev->mtd);
del_mtd_device(&dev->mtd);
INFO("mtd%d: [%s] removed", dev->mtd.index,
More information about the linux-mtd-cvs
mailing list