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>
This commit is contained in:
parent
74bdced4b4
commit
2baed30cb3
@ -197,6 +197,7 @@ static void spi_lm70llp_attach(struct parport *p)
|
|||||||
struct spi_lm70llp *pp;
|
struct spi_lm70llp *pp;
|
||||||
struct spi_master *master;
|
struct spi_master *master;
|
||||||
int status;
|
int status;
|
||||||
|
struct pardev_cb lm70llp_cb;
|
||||||
|
|
||||||
if (lm70llp) {
|
if (lm70llp) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
@ -228,9 +229,11 @@ static void spi_lm70llp_attach(struct parport *p)
|
|||||||
* Parport hookup
|
* Parport hookup
|
||||||
*/
|
*/
|
||||||
pp->port = p;
|
pp->port = p;
|
||||||
pd = parport_register_device(p, DRVNAME,
|
memset(&lm70llp_cb, 0, sizeof(lm70llp_cb));
|
||||||
NULL, NULL, NULL,
|
lm70llp_cb.private = pp;
|
||||||
PARPORT_FLAG_EXCL, pp);
|
lm70llp_cb.flags = PARPORT_FLAG_EXCL;
|
||||||
|
pd = parport_register_dev_model(p, DRVNAME, &lm70llp_cb, 0);
|
||||||
|
|
||||||
if (!pd) {
|
if (!pd) {
|
||||||
status = -ENOMEM;
|
status = -ENOMEM;
|
||||||
goto out_free_master;
|
goto out_free_master;
|
||||||
@ -322,8 +325,9 @@ static void spi_lm70llp_detach(struct parport *p)
|
|||||||
|
|
||||||
static struct parport_driver spi_lm70llp_drv = {
|
static struct parport_driver spi_lm70llp_drv = {
|
||||||
.name = DRVNAME,
|
.name = DRVNAME,
|
||||||
.attach = spi_lm70llp_attach,
|
.match_port = spi_lm70llp_attach,
|
||||||
.detach = spi_lm70llp_detach,
|
.detach = spi_lm70llp_detach,
|
||||||
|
.devmodel = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init init_spi_lm70llp(void)
|
static int __init init_spi_lm70llp(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user