Sfoglia il codice sorgente

mcp23s08: get rid of setup/teardown callbacks

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>
Peter Korsgaard 14 anni fa
parent
commit
1bb6f9b042
2 ha cambiato i file con 0 aggiunte e 28 eliminazioni
  1. 0 19
      drivers/gpio/gpio-mcp23s08.c
  2. 0 9
      include/linux/spi/mcp23s08.h

+ 0 - 19
drivers/gpio/gpio-mcp23s08.c

@@ -432,14 +432,6 @@ static int mcp23s08_probe(struct spi_device *spi)
 	 * handled here...
 	 * 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;
 	return 0;
 
 
 fail:
 fail:
@@ -459,20 +451,9 @@ fail:
 static int mcp23s08_remove(struct spi_device *spi)
 static int mcp23s08_remove(struct spi_device *spi)
 {
 {
 	struct mcp23s08_driver_data	*data = spi_get_drvdata(spi);
 	struct mcp23s08_driver_data	*data = spi_get_drvdata(spi);
-	struct mcp23s08_platform_data	*pdata = spi->dev.platform_data;
 	unsigned			addr;
 	unsigned			addr;
 	int				status = 0;
 	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++) {
 	for (addr = 0; addr < ARRAY_SIZE(data->mcp); addr++) {
 		int tmp;
 		int tmp;
 
 

+ 0 - 9
include/linux/spi/mcp23s08.h

@@ -22,13 +22,4 @@ struct mcp23s08_platform_data {
 	 * base to base+15 (or base+31 for s17 variant).
 	 * base to base+15 (or base+31 for s17 variant).
 	 */
 	 */
 	unsigned	base;
 	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);
 };
 };