rtc: fall back to requesting only the ports we actually use
[linux-2.6.git] / drivers / spi / spi_imx.c
index bd9177f..7686ba3 100644 (file)
@@ -1194,7 +1194,7 @@ static int setup(struct spi_device *spi)
                chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL);
                if (!chip) {
                        dev_err(&spi->dev,
-                               "setup - cannot allocate controller state");
+                               "setup - cannot allocate controller state\n");
                        return -ENOMEM;
                }
                chip->control = SPI_DEFAULT_CONTROL;
@@ -1206,7 +1206,7 @@ static int setup(struct spi_device *spi)
                        if (!chip_info) {
                                dev_err(&spi->dev,
                                        "setup - "
-                                       "cannot allocate controller data");
+                                       "cannot allocate controller data\n");
                                status = -ENOMEM;
                                goto err_first_setup;
                        }
@@ -1361,7 +1361,7 @@ static void cleanup(struct spi_device *spi)
        kfree(spi_get_ctldata(spi));
 }
 
-static int init_queue(struct driver_data *drv_data)
+static int __init init_queue(struct driver_data *drv_data)
 {
        INIT_LIST_HEAD(&drv_data->queue);
        spin_lock_init(&drv_data->lock);
@@ -1374,7 +1374,7 @@ static int init_queue(struct driver_data *drv_data)
 
        INIT_WORK(&drv_data->work, pump_messages);
        drv_data->workqueue = create_singlethread_workqueue(
-                                       drv_data->master->cdev.dev->bus_id);
+                                       drv_data->master->dev.parent->bus_id);
        if (drv_data->workqueue == NULL)
                return -EBUSY;
 
@@ -1444,7 +1444,7 @@ static int destroy_queue(struct driver_data *drv_data)
        return 0;
 }
 
-static int spi_imx_probe(struct platform_device *pdev)
+static int __init spi_imx_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct spi_imx_master *platform_info;
@@ -1622,7 +1622,7 @@ err_no_mem:
        return status;
 }
 
-static int __devexit spi_imx_remove(struct platform_device *pdev)
+static int __exit spi_imx_remove(struct platform_device *pdev)
 {
        struct driver_data *drv_data = platform_get_drvdata(pdev);
        int irq;
@@ -1739,8 +1739,7 @@ static struct platform_driver driver = {
                .bus = &platform_bus_type,
                .owner = THIS_MODULE,
        },
-       .probe = spi_imx_probe,
-       .remove = __devexit_p(spi_imx_remove),
+       .remove = __exit_p(spi_imx_remove),
        .shutdown = spi_imx_shutdown,
        .suspend = spi_imx_suspend,
        .resume = spi_imx_resume,
@@ -1748,7 +1747,7 @@ static struct platform_driver driver = {
 
 static int __init spi_imx_init(void)
 {
-       return platform_driver_register(&driver);
+       return platform_driver_probe(&driver, spi_imx_probe);
 }
 module_init(spi_imx_init);