mcp23s08: get rid of setup/teardown callbacks
authorPeter Korsgaard <jacmet@sunsite.dk>
Fri, 15 Jul 2011 08:25:30 +0000 (10:25 +0200)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 15 Jul 2011 19:54:17 +0000 (13:54 -0600)
There's no in-tree users, and bus notifiers are more generic anyway.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/gpio/gpio-mcp23s08.c
include/linux/spi/mcp23s08.h

index da3e04f0909bcf50cfa1d6bce3e51c6e02f487d6..ef61234c0e0325b0b8bd61d67304c6ed86de99f6 100644 (file)
@@ -432,14 +432,6 @@ static int mcp23s08_probe(struct spi_device *spi)
         * handled here...
         */
 
-       if (pdata->setup) {
-               status = pdata->setup(spi,
-                               pdata->base, data->ngpio,
-                               pdata->context);
-               if (status < 0)
-                       dev_dbg(&spi->dev, "setup --> %d\n", status);
-       }
-
        return 0;
 
 fail:
@@ -459,20 +451,9 @@ fail:
 static int mcp23s08_remove(struct spi_device *spi)
 {
        struct mcp23s08_driver_data     *data = spi_get_drvdata(spi);
-       struct mcp23s08_platform_data   *pdata = spi->dev.platform_data;
        unsigned                        addr;
        int                             status = 0;
 
-       if (pdata->teardown) {
-               status = pdata->teardown(spi,
-                               pdata->base, data->ngpio,
-                               pdata->context);
-               if (status < 0) {
-                       dev_err(&spi->dev, "%s --> %d\n", "teardown", status);
-                       return status;
-               }
-       }
-
        for (addr = 0; addr < ARRAY_SIZE(data->mcp); addr++) {
                int tmp;
 
index c42cff8ca1918ec84ba7b3371eeb93ad3718e3ff..2d676d5aaa894fdbcab4efb5d6cc32c5f3f00d58 100644 (file)
@@ -22,13 +22,4 @@ struct mcp23s08_platform_data {
         * base to base+15 (or base+31 for s17 variant).
         */
        unsigned        base;
-
-       void            *context;       /* param to setup/teardown */
-
-       int             (*setup)(struct spi_device *spi,
-                                       int gpio, unsigned ngpio,
-                                       void *context);
-       int             (*teardown)(struct spi_device *spi,
-                                       int gpio, unsigned ngpio,
-                                       void *context);
 };