The patch titled

     pcmcia: add pcmcia to IRQ information

has been added to the -mm tree.  Its filename is

     pcmcia-add-pcmcia-to-irq-information.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

ppp_mppe-add-ppp-mppe-encryption-module.patch
fix-smsc_ircc_init-return-value.patch
dlm-debug-fs.patch
pcmcia-add-pcmcia-to-irq-information.patch
nmi-lockup-and-altsysrq-p-dumping-calltraces-on-_all_-cpus-warning-fix.patch



From: Brice Goglin <[EMAIL PROTECTED]>

Add a devname parameter to the pcmcia_device structure, fills it with
"pcmcia<bus_id>" in pcmcia_device_add, and passes it to request_irq in
pcmcia_request_irq.

Signed-off-by: Brice Goglin <[EMAIL PROTECTED]>
Signed-off-by: Dominik Brodowski <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/pcmcia/ds.c              |   10 +++++++++-
 drivers/pcmcia/pcmcia_resource.c |    4 ++--
 include/pcmcia/ds.h              |    2 ++
 3 files changed, 13 insertions(+), 3 deletions(-)

diff -puN drivers/pcmcia/ds.c~pcmcia-add-pcmcia-to-irq-information 
drivers/pcmcia/ds.c
--- devel/drivers/pcmcia/ds.c~pcmcia-add-pcmcia-to-irq-information      
2005-08-29 22:30:45.000000000 -0700
+++ devel-akpm/drivers/pcmcia/ds.c      2005-08-29 22:30:45.000000000 -0700
@@ -354,6 +354,7 @@ static void pcmcia_release_dev(struct de
        struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
        ds_dbg(1, "releasing dev %p\n", p_dev);
        pcmcia_put_socket(p_dev->socket);
+       kfree(p_dev->devname);
        kfree(p_dev);
 }
 
@@ -504,6 +505,7 @@ struct pcmcia_device * pcmcia_device_add
 {
        struct pcmcia_device *p_dev;
        unsigned long flags;
+       int bus_id_len;
 
        s = pcmcia_get_socket(s);
        if (!s)
@@ -527,7 +529,12 @@ struct pcmcia_device * pcmcia_device_add
        p_dev->dev.bus = &pcmcia_bus_type;
        p_dev->dev.parent = s->dev.dev;
        p_dev->dev.release = pcmcia_release_dev;
-       sprintf (p_dev->dev.bus_id, "%d.%d", p_dev->socket->sock, 
p_dev->device_no);
+       bus_id_len = sprintf (p_dev->dev.bus_id, "%d.%d", p_dev->socket->sock, 
p_dev->device_no);
+
+       p_dev->devname = kmalloc(6 + bus_id_len + 1, GFP_KERNEL);
+       if (!p_dev->devname)
+               goto err_free;
+       sprintf (p_dev->devname, "pcmcia%s", p_dev->dev.bus_id);
 
        /* compat */
        p_dev->state = CLIENT_UNBOUND;
@@ -552,6 +559,7 @@ struct pcmcia_device * pcmcia_device_add
        return p_dev;
 
  err_free:
+       kfree(p_dev->devname);
        kfree(p_dev);
        s->device_count--;
  err_put:
diff -puN drivers/pcmcia/pcmcia_resource.c~pcmcia-add-pcmcia-to-irq-information 
drivers/pcmcia/pcmcia_resource.c
--- devel/drivers/pcmcia/pcmcia_resource.c~pcmcia-add-pcmcia-to-irq-information 
2005-08-29 22:30:45.000000000 -0700
+++ devel-akpm/drivers/pcmcia/pcmcia_resource.c 2005-08-29 22:30:45.000000000 
-0700
@@ -820,7 +820,7 @@ int pcmcia_request_irq(struct pcmcia_dev
                                          ((req->Attributes & 
IRQ_TYPE_DYNAMIC_SHARING) ||
                                           (s->functions > 1) ||
                                           (irq == s->pci_irq)) ? SA_SHIRQ : 0,
-                                         p_dev->dev.bus_id,
+                                         p_dev->devname,
                                          (req->Attributes & 
IRQ_HANDLE_PRESENT) ? req->Instance : data);
                        if (!ret) {
                                if (!(req->Attributes & IRQ_HANDLE_PRESENT))
@@ -842,7 +842,7 @@ int pcmcia_request_irq(struct pcmcia_dev
                                ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) ||
                                 (s->functions > 1) ||
                                 (irq == s->pci_irq)) ? SA_SHIRQ : 0,
-                               p_dev->dev.bus_id, req->Instance))
+                               p_dev->devname, req->Instance))
                        return CS_IN_USE;
        }
 
diff -puN include/pcmcia/ds.h~pcmcia-add-pcmcia-to-irq-information 
include/pcmcia/ds.h
--- devel/include/pcmcia/ds.h~pcmcia-add-pcmcia-to-irq-information      
2005-08-29 22:30:45.000000000 -0700
+++ devel-akpm/include/pcmcia/ds.h      2005-08-29 22:30:45.000000000 -0700
@@ -151,6 +151,8 @@ struct pcmcia_device {
           uniquely define a pcmcia_device */
        struct pcmcia_socket    *socket;
 
+       char                    *devname;
+
        u8                      device_no;
 
        /* the hardware "function" device; certain subdevices can
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to