chiark / gitweb /
[PATCH] fix unusual sysfs behavior for pcmcia_socket
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Fri, 15 Oct 2004 03:36:10 +0000 (20:36 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 05:02:44 +0000 (22:02 -0700)
All files in /sys/class/pcmcia_socket/pcmcia_socket0/* are unreadable
without a card inserted:

  read(3, 0x9167858, 4096) = -1 ENODEV (No such device)

So we need to skip that step for now.

wait_for_sysfs.c

index 6f396b96caf10ce6c7bf1a67035e2b90af579957..292edfad13e4a1883f91db050d7ffc8e871d9c29 100644 (file)
@@ -60,7 +60,7 @@ static int wait_for_class_device_attributes(struct sysfs_class_device *class_dev
                { .subsystem = "net",           .file = "ifindex" },
                { .subsystem = "scsi_host",     .file = "unique_id" },
                { .subsystem = "scsi_device",   .file = NULL },
-               { .subsystem = "pcmcia_socket", .file = "card_type" },
+               { .subsystem = "pcmcia_socket", .file = NULL }, /* all files are unreadable in empty slot :( */
                { .subsystem = "usb_host",      .file = NULL },
                { .subsystem = "bluetooth",     .file = "address" },
                { .subsystem = "i2c-adapter",   .file = NULL },