mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
of_serial: 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: Benjamin Herrenschmidt <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Stephen Rothwell <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Matthias Fuchs <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
d779206559
commit
3cf62a5a82
1 changed files with 2 additions and 2 deletions
|
|
@ -122,7 +122,7 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev,
|
|||
|
||||
info->type = port_type;
|
||||
info->line = ret;
|
||||
ofdev->dev.driver_data = info;
|
||||
dev_set_drvdata(&ofdev->dev, info);
|
||||
return 0;
|
||||
out:
|
||||
kfree(info);
|
||||
|
|
@ -135,7 +135,7 @@ out:
|
|||
*/
|
||||
static int of_platform_serial_remove(struct of_device *ofdev)
|
||||
{
|
||||
struct of_serial_info *info = ofdev->dev.driver_data;
|
||||
struct of_serial_info *info = dev_get_drvdata(&ofdev->dev);
|
||||
switch (info->type) {
|
||||
#ifdef CONFIG_SERIAL_8250
|
||||
case PORT_8250 ... PORT_MAX_8250:
|
||||
|
|
|
|||
Loading…
Reference in a new issue