diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-12 11:00:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 13:37:11 -0500 |
commit | 873733188a019acdb7fa253011cbdc0a8afd97f3 (patch) | |
tree | 99828bd5db2f183e1b2d2204dc2c94bd1f8fdbbb /drivers/pcmcia/ds.c | |
parent | 31b9025aa0f89b392077db3f87458fd46bcc4f58 (diff) |
Driver core: convert pcmcia code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Cc: <linux-pcmcia@lists.infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r-- | drivers/pcmcia/ds.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 7355eb455a88..18e111e12339 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -572,7 +572,7 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f | |||
572 | p_dev->func = function; | 572 | p_dev->func = function; |
573 | 573 | ||
574 | p_dev->dev.bus = &pcmcia_bus_type; | 574 | p_dev->dev.bus = &pcmcia_bus_type; |
575 | p_dev->dev.parent = s->dev.dev; | 575 | p_dev->dev.parent = s->dev.parent; |
576 | p_dev->dev.release = pcmcia_release_dev; | 576 | p_dev->dev.release = pcmcia_release_dev; |
577 | bus_id_len = sprintf (p_dev->dev.bus_id, "%d.%d", p_dev->socket->sock, p_dev->device_no); | 577 | bus_id_len = sprintf (p_dev->dev.bus_id, "%d.%d", p_dev->socket->sock, p_dev->device_no); |
578 | 578 | ||
@@ -1328,10 +1328,10 @@ static struct pcmcia_callback pcmcia_bus_callback = { | |||
1328 | .resume = pcmcia_bus_resume, | 1328 | .resume = pcmcia_bus_resume, |
1329 | }; | 1329 | }; |
1330 | 1330 | ||
1331 | static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev, | 1331 | static int __devinit pcmcia_bus_add_socket(struct device *dev, |
1332 | struct class_interface *class_intf) | 1332 | struct class_interface *class_intf) |
1333 | { | 1333 | { |
1334 | struct pcmcia_socket *socket = class_get_devdata(class_dev); | 1334 | struct pcmcia_socket *socket = dev_get_drvdata(dev); |
1335 | int ret; | 1335 | int ret; |
1336 | 1336 | ||
1337 | socket = pcmcia_get_socket(socket); | 1337 | socket = pcmcia_get_socket(socket); |
@@ -1364,10 +1364,10 @@ static int __devinit pcmcia_bus_add_socket(struct class_device *class_dev, | |||
1364 | return 0; | 1364 | return 0; |
1365 | } | 1365 | } |
1366 | 1366 | ||
1367 | static void pcmcia_bus_remove_socket(struct class_device *class_dev, | 1367 | static void pcmcia_bus_remove_socket(struct device *dev, |
1368 | struct class_interface *class_intf) | 1368 | struct class_interface *class_intf) |
1369 | { | 1369 | { |
1370 | struct pcmcia_socket *socket = class_get_devdata(class_dev); | 1370 | struct pcmcia_socket *socket = dev_get_drvdata(dev); |
1371 | 1371 | ||
1372 | if (!socket) | 1372 | if (!socket) |
1373 | return; | 1373 | return; |
@@ -1389,8 +1389,8 @@ static void pcmcia_bus_remove_socket(struct class_device *class_dev, | |||
1389 | /* the pcmcia_bus_interface is used to handle pcmcia socket devices */ | 1389 | /* the pcmcia_bus_interface is used to handle pcmcia socket devices */ |
1390 | static struct class_interface pcmcia_bus_interface = { | 1390 | static struct class_interface pcmcia_bus_interface = { |
1391 | .class = &pcmcia_socket_class, | 1391 | .class = &pcmcia_socket_class, |
1392 | .add = &pcmcia_bus_add_socket, | 1392 | .add_dev = &pcmcia_bus_add_socket, |
1393 | .remove = &pcmcia_bus_remove_socket, | 1393 | .remove_dev = &pcmcia_bus_remove_socket, |
1394 | }; | 1394 | }; |
1395 | 1395 | ||
1396 | 1396 | ||