summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-12-03 18:29:59 +0530
committerMark Brown <broonie@kernel.org>2015-12-04 12:19:10 +0000
commit2baed30cb30727b2637d26eac5a8887875a13420 (patch)
tree9e46388d068ba41b0d5f9fb70b95079675bc0b90 /drivers/spi
parent74bdced4b4ea8025d36880b923be16592d294c8e (diff)
downloadlinux-2baed30cb30727b2637d26eac5a8887875a13420.tar.gz
linux-2baed30cb30727b2637d26eac5a8887875a13420.tar.bz2
linux-2baed30cb30727b2637d26eac5a8887875a13420.zip
spi: lm70llp: use new parport device model
Modify spi-lm70llp driver to use the new parallel port device model. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-lm70llp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index 62d0f6dbbe45..ef829081abd7 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -197,6 +197,7 @@ static void spi_lm70llp_attach(struct parport *p)
struct spi_lm70llp *pp;
struct spi_master *master;
int status;
+ struct pardev_cb lm70llp_cb;
if (lm70llp) {
printk(KERN_WARNING
@@ -228,9 +229,11 @@ static void spi_lm70llp_attach(struct parport *p)
* Parport hookup
*/
pp->port = p;
- pd = parport_register_device(p, DRVNAME,
- NULL, NULL, NULL,
- PARPORT_FLAG_EXCL, pp);
+ memset(&lm70llp_cb, 0, sizeof(lm70llp_cb));
+ lm70llp_cb.private = pp;
+ lm70llp_cb.flags = PARPORT_FLAG_EXCL;
+ pd = parport_register_dev_model(p, DRVNAME, &lm70llp_cb, 0);
+
if (!pd) {
status = -ENOMEM;
goto out_free_master;
@@ -322,8 +325,9 @@ static void spi_lm70llp_detach(struct parport *p)
static struct parport_driver spi_lm70llp_drv = {
.name = DRVNAME,
- .attach = spi_lm70llp_attach,
+ .match_port = spi_lm70llp_attach,
.detach = spi_lm70llp_detach,
+ .devmodel = true,
};
static int __init init_spi_lm70llp(void)