]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/bt8xx/bttv-gpio.c
V4L/DVB (9521): V4L: struct device - replace bus_id with dev_name(), dev_set_name()
[linux-2.6-omap-h63xx.git] / drivers / media / video / bt8xx / bttv-gpio.c
index c4d5e2b70c28e12c28761b09713e5d669cb3fcdc..74c325e594a2eaf3509b139ef6b46a7a2f4d242a 100644 (file)
@@ -42,7 +42,7 @@ static int bttv_sub_bus_match(struct device *dev, struct device_driver *drv)
        struct bttv_sub_driver *sub = to_bttv_sub_drv(drv);
        int len = strlen(sub->wanted);
 
-       if (0 == strncmp(dev->bus_id, sub->wanted, len))
+       if (0 == strncmp(dev_name(dev), sub->wanted, len))
                return 1;
        return 0;
 }
@@ -71,7 +71,6 @@ struct bus_type bttv_sub_bus_type = {
        .probe  = bttv_sub_probe,
        .remove = bttv_sub_remove,
 };
-EXPORT_SYMBOL(bttv_sub_bus_type);
 
 static void release_sub_device(struct device *dev)
 {
@@ -92,46 +91,29 @@ int bttv_sub_add_device(struct bttv_core *core, char *name)
        sub->dev.parent  = &core->pci->dev;
        sub->dev.bus     = &bttv_sub_bus_type;
        sub->dev.release = release_sub_device;
-       snprintf(sub->dev.bus_id,sizeof(sub->dev.bus_id),"%s%d",
-                name, core->nr);
+       dev_set_name(&sub->dev, "%s%d", name, core->nr);
 
        err = device_register(&sub->dev);
        if (0 != err) {
                kfree(sub);
                return err;
        }
-       printk("bttv%d: add subdevice \"%s\"\n", core->nr, sub->dev.bus_id);
+       printk("bttv%d: add subdevice \"%s\"\n", core->nr, dev_name(&sub->dev));
        list_add_tail(&sub->list,&core->subs);
        return 0;
 }
 
 int bttv_sub_del_devices(struct bttv_core *core)
 {
-       struct bttv_sub_device *sub;
-       struct list_head *item,*save;
+       struct bttv_sub_device *sub, *save;
 
-       list_for_each_safe(item,save,&core->subs) {
-               sub = list_entry(item,struct bttv_sub_device,list);
+       list_for_each_entry_safe(sub, save, &core->subs, list) {
                list_del(&sub->list);
                device_unregister(&sub->dev);
        }
        return 0;
 }
 
-void bttv_gpio_irq(struct bttv_core *core)
-{
-       struct bttv_sub_driver *drv;
-       struct bttv_sub_device *dev;
-       struct list_head *item;
-
-       list_for_each(item,&core->subs) {
-               dev = list_entry(item,struct bttv_sub_device,list);
-               drv = to_bttv_sub_drv(dev->dev.driver);
-               if (drv && drv->gpio_irq)
-                       drv->gpio_irq(dev);
-       }
-}
-
 /* ----------------------------------------------------------------------- */
 /* external: sub-driver register/unregister                                */
 
@@ -166,7 +148,6 @@ void bttv_gpio_inout(struct bttv_core *core, u32 mask, u32 outbits)
        btwrite(data,BT848_GPIO_OUT_EN);
        spin_unlock_irqrestore(&btv->gpio_lock,flags);
 }
-EXPORT_SYMBOL(bttv_gpio_inout);
 
 u32 bttv_gpio_read(struct bttv_core *core)
 {
@@ -176,7 +157,6 @@ u32 bttv_gpio_read(struct bttv_core *core)
        value = btread(BT848_GPIO_DATA);
        return value;
 }
-EXPORT_SYMBOL(bttv_gpio_read);
 
 void bttv_gpio_write(struct bttv_core *core, u32 value)
 {
@@ -184,7 +164,6 @@ void bttv_gpio_write(struct bttv_core *core, u32 value)
 
        btwrite(value,BT848_GPIO_DATA);
 }
-EXPORT_SYMBOL(bttv_gpio_write);
 
 void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits)
 {
@@ -199,7 +178,6 @@ void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits)
        btwrite(data,BT848_GPIO_DATA);
        spin_unlock_irqrestore(&btv->gpio_lock,flags);
 }
-EXPORT_SYMBOL(bttv_gpio_bits);
 
 /*
  * Local variables: