]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/misc/tifm_core.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[net-next-2.6.git] / drivers / misc / tifm_core.c
index 97544052e7684dda18611c356ca65eab5d9da839..5f6852dff40bd3d04d82704e59ae4ef0335d3491 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <linux/tifm.h>
+#include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/idr.h>
 
@@ -203,7 +204,7 @@ int tifm_add_adapter(struct tifm_adapter *fm)
        if (rc)
                return rc;
 
-       snprintf(fm->dev.bus_id, BUS_ID_SIZE, "tifm%u", fm->id);
+       dev_set_name(&fm->dev, "tifm%u", fm->id);
        rc = device_add(&fm->dev);
        if (rc) {
                spin_lock(&tifm_adapter_lock);
@@ -266,9 +267,8 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id,
                sock->dev.dma_mask = fm->dev.parent->dma_mask;
                sock->dev.release = tifm_free_device;
 
-               snprintf(sock->dev.bus_id, BUS_ID_SIZE,
-                        "tifm_%s%u:%u", tifm_media_type_name(type, 2),
-                        fm->id, id);
+               dev_set_name(&sock->dev, "tifm_%s%u:%u",
+                            tifm_media_type_name(type, 2), fm->id, id);
                printk(KERN_INFO DRIVER_NAME
                       ": %s card detected in socket %u:%u\n",
                       tifm_media_type_name(type, 0), fm->id, id);
@@ -284,6 +284,13 @@ void tifm_eject(struct tifm_dev *sock)
 }
 EXPORT_SYMBOL(tifm_eject);
 
+int tifm_has_ms_pif(struct tifm_dev *sock)
+{
+       struct tifm_adapter *fm = dev_get_drvdata(sock->dev.parent);
+       return fm->has_ms_pif(fm, sock);
+}
+EXPORT_SYMBOL(tifm_has_ms_pif);
+
 int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents,
                int direction)
 {