Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits) tty: serial: altera_jtaguart: Add device tree support tty: serial: altera_uart: Add devicetree support dt: eliminate of_platform_driver shim code dt: Eliminate of_platform_{,un}register_driver dt/serial: Eliminate users of of_platform_{,un}register_driver dt/usb: Eliminate users of of_platform_{,un}register_driver dt/video: Eliminate users of of_platform_{,un}register_driver dt/net: Eliminate users of of_platform_{,un}register_driver dt/sound: Eliminate users of of_platform_{,un}register_driver dt/spi: Eliminate users of of_platform_{,un}register_driver dt: uartlite: merge platform and of_platform driver bindings dt: xilinx_hwicap: merge platform and of_platform driver bindings ipmi: convert OF driver to platform driver leds/leds-gpio: merge platform_driver with of_platform_driver dt/sparc: Eliminate users of of_platform_{,un}register_driver dt/powerpc: Eliminate users of of_platform_{,un}register_driver dt/powerpc: move of_bus_type infrastructure to ibmebus drivercore/dt: add a match table pointer to struct device dt: Typo fix. altera_ps2: Add devicetree support ...
This commit is contained in:
@@ -80,14 +80,16 @@ static int __devinit of_platform_serial_setup(struct platform_device *ofdev,
|
||||
/*
|
||||
* Try to register a serial port
|
||||
*/
|
||||
static int __devinit of_platform_serial_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *id)
|
||||
static int __devinit of_platform_serial_probe(struct platform_device *ofdev)
|
||||
{
|
||||
struct of_serial_info *info;
|
||||
struct uart_port port;
|
||||
int port_type;
|
||||
int ret;
|
||||
|
||||
if (!ofdev->dev.of_match)
|
||||
return -EINVAL;
|
||||
|
||||
if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL))
|
||||
return -EBUSY;
|
||||
|
||||
@@ -95,7 +97,7 @@ static int __devinit of_platform_serial_probe(struct platform_device *ofdev,
|
||||
if (info == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
port_type = (unsigned long)id->data;
|
||||
port_type = (unsigned long)ofdev->dev.of_match->data;
|
||||
ret = of_platform_serial_setup(ofdev, port_type, &port);
|
||||
if (ret)
|
||||
goto out;
|
||||
@@ -174,7 +176,7 @@ static struct of_device_id __devinitdata of_platform_serial_table[] = {
|
||||
{ /* end of list */ },
|
||||
};
|
||||
|
||||
static struct of_platform_driver of_platform_serial_driver = {
|
||||
static struct platform_driver of_platform_serial_driver = {
|
||||
.driver = {
|
||||
.name = "of_serial",
|
||||
.owner = THIS_MODULE,
|
||||
@@ -186,13 +188,13 @@ static struct of_platform_driver of_platform_serial_driver = {
|
||||
|
||||
static int __init of_platform_serial_init(void)
|
||||
{
|
||||
return of_register_platform_driver(&of_platform_serial_driver);
|
||||
return platform_driver_register(&of_platform_serial_driver);
|
||||
}
|
||||
module_init(of_platform_serial_init);
|
||||
|
||||
static void __exit of_platform_serial_exit(void)
|
||||
{
|
||||
return of_unregister_platform_driver(&of_platform_serial_driver);
|
||||
return platform_driver_unregister(&of_platform_serial_driver);
|
||||
};
|
||||
module_exit(of_platform_serial_exit);
|
||||
|
||||
|
Reference in New Issue
Block a user