aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 15:57:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 15:57:37 -0400
commit6fd03301d76bc439382710e449f58efbb233df1b (patch)
tree3c8a3217aed67319683ffc1debccdb5b3245b16c /drivers/block
parentcd5232bd6be2d215a800f3d88c287ca791debfbe (diff)
parente4792aa30f9d33584d7192685ed149cc5fee737f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (64 commits) debugfs: use specified mode to possibly mark files read/write only debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. xen: remove driver_data direct access of struct device from more drivers usb: gadget: at91_udc: remove driver_data direct access of struct device uml: remove driver_data direct access of struct device block/ps3: remove driver_data direct access of struct device s390: remove driver_data direct access of struct device parport: remove driver_data direct access of struct device parisc: remove driver_data direct access of struct device of_serial: remove driver_data direct access of struct device mips: remove driver_data direct access of struct device ipmi: remove driver_data direct access of struct device infiniband: ehca: remove driver_data direct access of struct device ibmvscsi: gadget: at91_udc: remove driver_data direct access of struct device hvcs: remove driver_data direct access of struct device xen block: remove driver_data direct access of struct device thermal: remove driver_data direct access of struct device scsi: remove driver_data direct access of struct device pcmcia: remove driver_data direct access of struct device PCIE: remove driver_data direct access of struct device ... Manually fix up trivial conflicts due to different direct driver_data direct access fixups in drivers/block/{ps3disk.c,ps3vram.c}
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/aoe/aoechr.c7
-rw-r--r--drivers/block/pktcdvd.c9
-rw-r--r--drivers/block/xen-blkfront.c14
3 files changed, 22 insertions, 8 deletions
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
index 200efc4d2c1e..19888354188f 100644
--- a/drivers/block/aoe/aoechr.c
+++ b/drivers/block/aoe/aoechr.c
@@ -266,6 +266,11 @@ static const struct file_operations aoe_fops = {
266 .owner = THIS_MODULE, 266 .owner = THIS_MODULE,
267}; 267};
268 268
269static char *aoe_nodename(struct device *dev)
270{
271 return kasprintf(GFP_KERNEL, "etherd/%s", dev_name(dev));
272}
273
269int __init 274int __init
270aoechr_init(void) 275aoechr_init(void)
271{ 276{
@@ -283,6 +288,8 @@ aoechr_init(void)
283 unregister_chrdev(AOE_MAJOR, "aoechr"); 288 unregister_chrdev(AOE_MAJOR, "aoechr");
284 return PTR_ERR(aoe_class); 289 return PTR_ERR(aoe_class);
285 } 290 }
291 aoe_class->nodename = aoe_nodename;
292
286 for (i = 0; i < ARRAY_SIZE(chardevs); ++i) 293 for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
287 device_create(aoe_class, NULL, 294 device_create(aoe_class, NULL,
288 MKDEV(AOE_MAJOR, chardevs[i].minor), NULL, 295 MKDEV(AOE_MAJOR, chardevs[i].minor), NULL,
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index d57f11759480..83650e00632d 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -430,7 +430,7 @@ static void pkt_sysfs_cleanup(void)
430/******************************************************************** 430/********************************************************************
431 entries in debugfs 431 entries in debugfs
432 432
433 /debugfs/pktcdvd[0-7]/ 433 /sys/kernel/debug/pktcdvd[0-7]/
434 info 434 info
435 435
436 *******************************************************************/ 436 *******************************************************************/
@@ -2855,6 +2855,11 @@ static struct block_device_operations pktcdvd_ops = {
2855 .media_changed = pkt_media_changed, 2855 .media_changed = pkt_media_changed,
2856}; 2856};
2857 2857
2858static char *pktcdvd_nodename(struct gendisk *gd)
2859{
2860 return kasprintf(GFP_KERNEL, "pktcdvd/%s", gd->disk_name);
2861}
2862
2858/* 2863/*
2859 * Set up mapping from pktcdvd device to CD-ROM device. 2864 * Set up mapping from pktcdvd device to CD-ROM device.
2860 */ 2865 */
@@ -2907,6 +2912,7 @@ static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev)
2907 disk->fops = &pktcdvd_ops; 2912 disk->fops = &pktcdvd_ops;
2908 disk->flags = GENHD_FL_REMOVABLE; 2913 disk->flags = GENHD_FL_REMOVABLE;
2909 strcpy(disk->disk_name, pd->name); 2914 strcpy(disk->disk_name, pd->name);
2915 disk->nodename = pktcdvd_nodename;
2910 disk->private_data = pd; 2916 disk->private_data = pd;
2911 disk->queue = blk_alloc_queue(GFP_KERNEL); 2917 disk->queue = blk_alloc_queue(GFP_KERNEL);
2912 if (!disk->queue) 2918 if (!disk->queue)
@@ -3062,6 +3068,7 @@ static const struct file_operations pkt_ctl_fops = {
3062static struct miscdevice pkt_misc = { 3068static struct miscdevice pkt_misc = {
3063 .minor = MISC_DYNAMIC_MINOR, 3069 .minor = MISC_DYNAMIC_MINOR,
3064 .name = DRIVER_NAME, 3070 .name = DRIVER_NAME,
3071 .name = "pktcdvd/control",
3065 .fops = &pkt_ctl_fops 3072 .fops = &pkt_ctl_fops
3066}; 3073};
3067 3074
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index c1996829d5ec..e53284767f7c 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -753,12 +753,12 @@ static int blkfront_probe(struct xenbus_device *dev,
753 753
754 /* Front end dir is a number, which is used as the id. */ 754 /* Front end dir is a number, which is used as the id. */
755 info->handle = simple_strtoul(strrchr(dev->nodename, '/')+1, NULL, 0); 755 info->handle = simple_strtoul(strrchr(dev->nodename, '/')+1, NULL, 0);
756 dev->dev.driver_data = info; 756 dev_set_drvdata(&dev->dev, info);
757 757
758 err = talk_to_backend(dev, info); 758 err = talk_to_backend(dev, info);
759 if (err) { 759 if (err) {
760 kfree(info); 760 kfree(info);
761 dev->dev.driver_data = NULL; 761 dev_set_drvdata(&dev->dev, NULL);
762 return err; 762 return err;
763 } 763 }
764 764
@@ -843,7 +843,7 @@ static int blkif_recover(struct blkfront_info *info)
843 */ 843 */
844static int blkfront_resume(struct xenbus_device *dev) 844static int blkfront_resume(struct xenbus_device *dev)
845{ 845{
846 struct blkfront_info *info = dev->dev.driver_data; 846 struct blkfront_info *info = dev_get_drvdata(&dev->dev);
847 int err; 847 int err;
848 848
849 dev_dbg(&dev->dev, "blkfront_resume: %s\n", dev->nodename); 849 dev_dbg(&dev->dev, "blkfront_resume: %s\n", dev->nodename);
@@ -922,7 +922,7 @@ static void blkfront_connect(struct blkfront_info *info)
922 */ 922 */
923static void blkfront_closing(struct xenbus_device *dev) 923static void blkfront_closing(struct xenbus_device *dev)
924{ 924{
925 struct blkfront_info *info = dev->dev.driver_data; 925 struct blkfront_info *info = dev_get_drvdata(&dev->dev);
926 unsigned long flags; 926 unsigned long flags;
927 927
928 dev_dbg(&dev->dev, "blkfront_closing: %s removed\n", dev->nodename); 928 dev_dbg(&dev->dev, "blkfront_closing: %s removed\n", dev->nodename);
@@ -957,7 +957,7 @@ static void blkfront_closing(struct xenbus_device *dev)
957static void backend_changed(struct xenbus_device *dev, 957static void backend_changed(struct xenbus_device *dev,
958 enum xenbus_state backend_state) 958 enum xenbus_state backend_state)
959{ 959{
960 struct blkfront_info *info = dev->dev.driver_data; 960 struct blkfront_info *info = dev_get_drvdata(&dev->dev);
961 struct block_device *bd; 961 struct block_device *bd;
962 962
963 dev_dbg(&dev->dev, "blkfront:backend_changed.\n"); 963 dev_dbg(&dev->dev, "blkfront:backend_changed.\n");
@@ -997,7 +997,7 @@ static void backend_changed(struct xenbus_device *dev,
997 997
998static int blkfront_remove(struct xenbus_device *dev) 998static int blkfront_remove(struct xenbus_device *dev)
999{ 999{
1000 struct blkfront_info *info = dev->dev.driver_data; 1000 struct blkfront_info *info = dev_get_drvdata(&dev->dev);
1001 1001
1002 dev_dbg(&dev->dev, "blkfront_remove: %s removed\n", dev->nodename); 1002 dev_dbg(&dev->dev, "blkfront_remove: %s removed\n", dev->nodename);
1003 1003
@@ -1010,7 +1010,7 @@ static int blkfront_remove(struct xenbus_device *dev)
1010 1010
1011static int blkfront_is_ready(struct xenbus_device *dev) 1011static int blkfront_is_ready(struct xenbus_device *dev)
1012{ 1012{
1013 struct blkfront_info *info = dev->dev.driver_data; 1013 struct blkfront_info *info = dev_get_drvdata(&dev->dev);
1014 1014
1015 return info->is_ready; 1015 return info->is_ready;
1016} 1016}