Commit 61616115d748e2eb76c43715383e602b09d9bf50
1 parent
d18dbfa7aa
Exists in
master
and in
7 other branches
parport: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/parport/parport_gsc.c
... | ... | @@ -376,14 +376,14 @@ |
376 | 376 | /* PARPORT_IRQ_NONE */ PARPORT_DMA_NONE, NULL); |
377 | 377 | if (p) |
378 | 378 | parport_count++; |
379 | - dev->dev.driver_data = p; | |
379 | + dev_set_drvdata(&dev->dev, p); | |
380 | 380 | |
381 | 381 | return 0; |
382 | 382 | } |
383 | 383 | |
384 | 384 | static int __devexit parport_remove_chip(struct parisc_device *dev) |
385 | 385 | { |
386 | - struct parport *p = dev->dev.driver_data; | |
386 | + struct parport *p = dev_get_drvdata(&dev->dev); | |
387 | 387 | if (p) { |
388 | 388 | struct parport_gsc_private *priv = p->private_data; |
389 | 389 | struct parport_operations *ops = p->ops; |