Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2 -2
+2 -2
drivers/parport/parport_gsc.c
··· 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;