2003-06-22 01:34:56

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: [PATCH] fix sysfs bogosity in i82365.c

Hi Linus,

Please consider applying, it was using a non-existent socket[] index
and not doing it for all sockets.

Without this, forget about using i82365, crashes on boot :-)

- Arnaldo

===== drivers/pcmcia/i82365.c 1.36 vs edited =====
--- 1.36/drivers/pcmcia/i82365.c Sun Jun 15 12:20:52 2003
+++ edited/drivers/pcmcia/i82365.c Sat Jun 21 22:09:08 2003
@@ -1471,6 +1471,10 @@
pcmcia_unregister_socket(&socket[i].socket);
break;
}
+ class_device_create_file(&socket[i].socket.dev,
+ &class_device_attr_info);
+ class_device_create_file(&socket[i].socket.dev,
+ &class_device_attr_exca);
}

/* Finally, schedule a polling interrupt */
@@ -1481,9 +1485,6 @@
poll_timer.expires = jiffies + poll_interval;
add_timer(&poll_timer);
}
-
- class_device_create_file(&socket[i].socket.dev, &class_device_attr_info);
- class_device_create_file(&socket[i].socket.dev, &class_device_attr_exca);

return 0;