diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 15:57:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 15:57:37 -0400 |
commit | 6fd03301d76bc439382710e449f58efbb233df1b (patch) | |
tree | 3c8a3217aed67319683ffc1debccdb5b3245b16c /drivers/char | |
parent | cd5232bd6be2d215a800f3d88c287ca791debfbe (diff) | |
parent | e4792aa30f9d33584d7192685ed149cc5fee737f (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')
-rw-r--r-- | drivers/char/hvcs.c | 6 | ||||
-rw-r--r-- | drivers/char/hw_random/core.c | 1 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 4 | ||||
-rw-r--r-- | drivers/char/misc.c | 15 | ||||
-rw-r--r-- | drivers/char/raw.c | 6 |
5 files changed, 24 insertions, 8 deletions
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index c76bccf5354d..7d64e4230e66 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c | |||
@@ -347,7 +347,7 @@ static void __exit hvcs_module_exit(void); | |||
347 | 347 | ||
348 | static inline struct hvcs_struct *from_vio_dev(struct vio_dev *viod) | 348 | static inline struct hvcs_struct *from_vio_dev(struct vio_dev *viod) |
349 | { | 349 | { |
350 | return viod->dev.driver_data; | 350 | return dev_get_drvdata(&viod->dev); |
351 | } | 351 | } |
352 | /* The sysfs interface for the driver and devices */ | 352 | /* The sysfs interface for the driver and devices */ |
353 | 353 | ||
@@ -785,7 +785,7 @@ static int __devinit hvcs_probe( | |||
785 | kref_init(&hvcsd->kref); | 785 | kref_init(&hvcsd->kref); |
786 | 786 | ||
787 | hvcsd->vdev = dev; | 787 | hvcsd->vdev = dev; |
788 | dev->dev.driver_data = hvcsd; | 788 | dev_set_drvdata(&dev->dev, hvcsd); |
789 | 789 | ||
790 | hvcsd->index = index; | 790 | hvcsd->index = index; |
791 | 791 | ||
@@ -831,7 +831,7 @@ static int __devinit hvcs_probe( | |||
831 | 831 | ||
832 | static int __devexit hvcs_remove(struct vio_dev *dev) | 832 | static int __devexit hvcs_remove(struct vio_dev *dev) |
833 | { | 833 | { |
834 | struct hvcs_struct *hvcsd = dev->dev.driver_data; | 834 | struct hvcs_struct *hvcsd = dev_get_drvdata(&dev->dev); |
835 | unsigned long flags; | 835 | unsigned long flags; |
836 | struct tty_struct *tty; | 836 | struct tty_struct *tty; |
837 | 837 | ||
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index e5d583c84e4f..fc93e2fc7c71 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c | |||
@@ -153,6 +153,7 @@ static const struct file_operations rng_chrdev_ops = { | |||
153 | static struct miscdevice rng_miscdev = { | 153 | static struct miscdevice rng_miscdev = { |
154 | .minor = RNG_MISCDEV_MINOR, | 154 | .minor = RNG_MISCDEV_MINOR, |
155 | .name = RNG_MODULE_NAME, | 155 | .name = RNG_MODULE_NAME, |
156 | .devnode = "hwrng", | ||
156 | .fops = &rng_chrdev_ops, | 157 | .fops = &rng_chrdev_ops, |
157 | }; | 158 | }; |
158 | 159 | ||
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 259644646b82..d2e698096ace 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2375,14 +2375,14 @@ static int __devinit ipmi_of_probe(struct of_device *dev, | |||
2375 | info->io.addr_data, info->io.regsize, info->io.regspacing, | 2375 | info->io.addr_data, info->io.regsize, info->io.regspacing, |
2376 | info->irq); | 2376 | info->irq); |
2377 | 2377 | ||
2378 | dev->dev.driver_data = (void *) info; | 2378 | dev_set_drvdata(&dev->dev, info); |
2379 | 2379 | ||
2380 | return try_smi_init(info); | 2380 | return try_smi_init(info); |
2381 | } | 2381 | } |
2382 | 2382 | ||
2383 | static int __devexit ipmi_of_remove(struct of_device *dev) | 2383 | static int __devexit ipmi_of_remove(struct of_device *dev) |
2384 | { | 2384 | { |
2385 | cleanup_one_si(dev->dev.driver_data); | 2385 | cleanup_one_si(dev_get_drvdata(&dev->dev)); |
2386 | return 0; | 2386 | return 0; |
2387 | } | 2387 | } |
2388 | 2388 | ||
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index a5e0db9d7662..62c99fa59e2b 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c | |||
@@ -168,7 +168,6 @@ static const struct file_operations misc_fops = { | |||
168 | .open = misc_open, | 168 | .open = misc_open, |
169 | }; | 169 | }; |
170 | 170 | ||
171 | |||
172 | /** | 171 | /** |
173 | * misc_register - register a miscellaneous device | 172 | * misc_register - register a miscellaneous device |
174 | * @misc: device structure | 173 | * @misc: device structure |
@@ -217,8 +216,8 @@ int misc_register(struct miscdevice * misc) | |||
217 | misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); | 216 | misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); |
218 | dev = MKDEV(MISC_MAJOR, misc->minor); | 217 | dev = MKDEV(MISC_MAJOR, misc->minor); |
219 | 218 | ||
220 | misc->this_device = device_create(misc_class, misc->parent, dev, NULL, | 219 | misc->this_device = device_create(misc_class, misc->parent, dev, |
221 | "%s", misc->name); | 220 | misc, "%s", misc->name); |
222 | if (IS_ERR(misc->this_device)) { | 221 | if (IS_ERR(misc->this_device)) { |
223 | err = PTR_ERR(misc->this_device); | 222 | err = PTR_ERR(misc->this_device); |
224 | goto out; | 223 | goto out; |
@@ -264,6 +263,15 @@ int misc_deregister(struct miscdevice *misc) | |||
264 | EXPORT_SYMBOL(misc_register); | 263 | EXPORT_SYMBOL(misc_register); |
265 | EXPORT_SYMBOL(misc_deregister); | 264 | EXPORT_SYMBOL(misc_deregister); |
266 | 265 | ||
266 | static char *misc_nodename(struct device *dev) | ||
267 | { | ||
268 | struct miscdevice *c = dev_get_drvdata(dev); | ||
269 | |||
270 | if (c->devnode) | ||
271 | return kstrdup(c->devnode, GFP_KERNEL); | ||
272 | return NULL; | ||
273 | } | ||
274 | |||
267 | static int __init misc_init(void) | 275 | static int __init misc_init(void) |
268 | { | 276 | { |
269 | int err; | 277 | int err; |
@@ -279,6 +287,7 @@ static int __init misc_init(void) | |||
279 | err = -EIO; | 287 | err = -EIO; |
280 | if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) | 288 | if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) |
281 | goto fail_printk; | 289 | goto fail_printk; |
290 | misc_class->nodename = misc_nodename; | ||
282 | return 0; | 291 | return 0; |
283 | 292 | ||
284 | fail_printk: | 293 | fail_printk: |
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 | ||
262 | static struct cdev raw_cdev; | 262 | static struct cdev raw_cdev; |
263 | 263 | ||
264 | static char *raw_nodename(struct device *dev) | ||
265 | { | ||
266 | return kasprintf(GFP_KERNEL, "raw/%s", dev_name(dev)); | ||
267 | } | ||
268 | |||
264 | static int __init raw_init(void) | 269 | static 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; |