diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index 14f8fa9135be49c664f64d80c9633bf1d405f85c..54483cd3529e00e85df152efb5cb95c3c654d924 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c @@ -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 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev, */ 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: