pcmcia: dev_node removal (core)
authorDominik Brodowski <linux@dominikbrodowski.net>
Sat, 20 Mar 2010 18:43:40 +0000 (19:43 +0100)
committerDominik Brodowski <linux@dominikbrodowski.net>
Mon, 10 May 2010 08:23:17 +0000 (10:23 +0200)
Remove the dev_node declaration. We now only pass the device name
to the deprecated userspace tools.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Documentation/pcmcia/driver-changes.txt
drivers/pcmcia/ds.c
drivers/pcmcia/pcmcia_ioctl.c
include/pcmcia/ds.h

index 3268a9a..61bc4e9 100644 (file)
@@ -1,4 +1,7 @@
 This file details changes in 2.6 which affect PCMCIA card driver authors:
+* No dev_node_t (as of 2.6.35)
+   There is no more need to fill out a "dev_node_t" structure.
+
 * New IRQ request rules (as of 2.6.35)
    Instead of the old pcmcia_request_irq() interface, drivers may now
    choose between:
index a2649c7..0e12d85 100644 (file)
@@ -371,8 +371,6 @@ static int pcmcia_device_remove(struct device *dev)
        if (p_drv->remove)
                p_drv->remove(p_dev);
 
-       p_dev->dev_node = NULL;
-
        /* check for proper unloading */
        if (p_dev->_irq || p_dev->_io || p_dev->_locked)
                dev_printk(KERN_INFO, dev,
index fe98aa9..a42a6c7 100644 (file)
@@ -571,7 +571,6 @@ static struct pci_bus *pcmcia_lookup_bus(struct pcmcia_socket *s)
 
 static int get_device_info(struct pcmcia_socket *s, bind_info_t *bind_info, int first)
 {
-       dev_node_t *node;
        struct pcmcia_device *p_dev;
        struct pcmcia_driver *p_drv;
        int ret = 0;
@@ -633,21 +632,13 @@ static int get_device_info(struct pcmcia_socket *s, bind_info_t *bind_info, int
                goto err_put;
        }
 
-       if (first)
-               node = p_dev->dev_node;
-       else
-               for (node = p_dev->dev_node; node; node = node->next)
-                       if (node == bind_info->next)
-                               break;
-       if (!node) {
+       if (!first) {
                ret = -ENODEV;
                goto err_put;
        }
 
-       strlcpy(bind_info->name, node->dev_name, DEV_NAME_LEN);
-       bind_info->major = node->major;
-       bind_info->minor = node->minor;
-       bind_info->next = node->next;
+       strlcpy(bind_info->name, dev_name(&p_dev->dev), DEV_NAME_LEN);
+       bind_info->next = NULL;
 
  err_put:
        pcmcia_put_dev(p_dev);
index d18330b..b4429f7 100644 (file)
@@ -62,15 +62,6 @@ struct pcmcia_driver {
 int pcmcia_register_driver(struct pcmcia_driver *driver);
 void pcmcia_unregister_driver(struct pcmcia_driver *driver);
 
-/* Some drivers use dev_node_t to store char or block device information.
- * Don't use this in new drivers, though.
- */
-typedef struct dev_node_t {
-       char                    dev_name[DEV_NAME_LEN];
-       u_short                 major, minor;
-       struct dev_node_t       *next;
-} dev_node_t;
-
 struct pcmcia_device {
        /* the socket and the device_no [for multifunction devices]
           uniquely define a pcmcia_device */
@@ -88,7 +79,6 @@ struct pcmcia_device {
        struct list_head        socket_device_list;
 
        /* deprecated, will be cleaned up soon */
-       dev_node_t              *dev_node;
        u_int                   open;
        io_req_t                io;
        config_req_t            conf;