aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/raw.c
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/char/raw.c
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/char/raw.c')
-rw-r--r--drivers/char/raw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index db32f0e4c7dd..05f9d18b9361 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -261,6 +261,11 @@ static const struct file_operations raw_ctl_fops = {
261 261
262static struct cdev raw_cdev; 262static struct cdev raw_cdev;
263 263
264static char *raw_nodename(struct device *dev)
265{
266 return kasprintf(GFP_KERNEL, "raw/%s", dev_name(dev));
267}
268
264static int __init raw_init(void) 269static int __init raw_init(void)
265{ 270{
266 dev_t dev = MKDEV(RAW_MAJOR, 0); 271 dev_t dev = MKDEV(RAW_MAJOR, 0);
@@ -284,6 +289,7 @@ static int __init raw_init(void)
284 ret = PTR_ERR(raw_class); 289 ret = PTR_ERR(raw_class);
285 goto error_region; 290 goto error_region;
286 } 291 }
292 raw_class->nodename = raw_nodename;
287 device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); 293 device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
288 294
289 return 0; 295 return 0;