Input: cyttsp - use devres managed resource allocations

Use devm_() functions for allocating memory, input device and IRQ.

Signed-off-by: Oreste Salerno <oreste.salerno@tomtom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Oreste Salerno
2016-01-27 13:53:33 -08:00
committed by Dmitry Torokhov
parent 809d9516da
commit e4cf92ba44
4 changed files with 30 additions and 59 deletions

View File

@@ -170,22 +170,12 @@ static int cyttsp_spi_probe(struct spi_device *spi)
return 0;
}
static int cyttsp_spi_remove(struct spi_device *spi)
{
struct cyttsp *ts = spi_get_drvdata(spi);
cyttsp_remove(ts);
return 0;
}
static struct spi_driver cyttsp_spi_driver = {
.driver = {
.name = CY_SPI_NAME,
.pm = &cyttsp_pm_ops,
},
.probe = cyttsp_spi_probe,
.remove = cyttsp_spi_remove,
};
module_spi_driver(cyttsp_spi_driver);