Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fsi: scom: Convert to fsi bus probe mechanism

The fsi bus got a dedicated probe function. Make use of that. This fixes
a runtime warning about the driver needing to be converted to the bus
probe method.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Acked-by: Eddie James <eajames@linux.ibm.com>
Link: https://patch.msgid.link/d02a22f2f5442dc03d1d803d1b8190bc89bc71d4.1765279318.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Uwe Kleine-König and committed by
Greg Kroah-Hartman
0d295b19 0cf9580a

+7 -9
+7 -9
drivers/fsi/fsi-scom.c
··· 527 527 kfree(scom); 528 528 } 529 529 530 - static int scom_probe(struct device *dev) 530 + static int scom_probe(struct fsi_device *fsi_dev) 531 531 { 532 - struct fsi_device *fsi_dev = to_fsi_dev(dev); 532 + struct device *dev = &fsi_dev->dev; 533 533 struct scom_device *scom; 534 534 int rc, didx; 535 535 536 536 scom = kzalloc(sizeof(*scom), GFP_KERNEL); 537 537 if (!scom) 538 538 return -ENOMEM; 539 - dev_set_drvdata(dev, scom); 539 + fsi_set_drvdata(fsi_dev, scom); 540 540 mutex_init(&scom->lock); 541 541 542 542 /* Grab a reference to the device (parent of our cdev), we'll drop it later */ ··· 574 574 return rc; 575 575 } 576 576 577 - static int scom_remove(struct device *dev) 577 + static void scom_remove(struct fsi_device *fsi_dev) 578 578 { 579 - struct scom_device *scom = dev_get_drvdata(dev); 579 + struct scom_device *scom = fsi_get_drvdata(fsi_dev); 580 580 581 581 mutex_lock(&scom->lock); 582 582 scom->dead = true; ··· 584 584 cdev_device_del(&scom->cdev, &scom->dev); 585 585 fsi_free_minor(scom->dev.devt); 586 586 put_device(&scom->dev); 587 - 588 - return 0; 589 587 } 590 588 591 589 static const struct of_device_id scom_of_ids[] = { ··· 602 604 603 605 static struct fsi_driver scom_drv = { 604 606 .id_table = scom_ids, 607 + .probe = scom_probe, 608 + .remove = scom_remove, 605 609 .drv = { 606 610 .name = "scom", 607 611 .of_match_table = scom_of_ids, 608 - .probe = scom_probe, 609 - .remove = scom_remove, 610 612 } 611 613 }; 612 614