Commit b55cdbfa authored by Russell King's avatar Russell King

[PCMCIA] Clean up class device attribute registration and fix build error

parent b45aa330
...@@ -134,21 +134,24 @@ static struct class_device_attribute *pccard_socket_attributes[] = { ...@@ -134,21 +134,24 @@ static struct class_device_attribute *pccard_socket_attributes[] = {
static int __devinit pccard_sysfs_add_socket(struct class_device *class_dev) static int __devinit pccard_sysfs_add_socket(struct class_device *class_dev)
{ {
unsigned int i; struct class_device_attribute **attr;
int ret = 0; int ret = 0;
for (i = 0; (attr = pccard_socket_attributes[i]); i++) {
if ((ret = class_device_create_file(class_dev, attr))) for (attr = pccard_socket_attributes; *attr; attr++) {
return (ret); ret = class_device_create_file(class_dev, *attr);
if (ret)
break;
} }
return (ret);
return ret;
} }
static void __devexit pccard_sysfs_remove_socket(struct class_device *class_dev) static void __devexit pccard_sysfs_remove_socket(struct class_device *class_dev)
{ {
struct class_device_attribute *attr; struct class_device_attribute **attr;
unsigned int i;
for (i = 0; (attr = pccard_socket_attributes[i]); i++) for (attr = pccard_socket_attributes; *attr; attr++)
class_device_remove_file(class_dev, attr); class_device_remove_file(class_dev, *attr);
} }
struct class_interface pccard_sysfs_interface = { struct class_interface pccard_sysfs_interface = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment