Thread (1 message) 1 message, 1 author, 2017-02-21
DORMANTno replies

[rtc-linux] [PATCH 14/14] switchtec: utilize new device_add_cdev helper function

From: Logan Gunthorpe <logang@deltatee.com>
Date: 2017-02-21 05:00:53
Also in: linux-fsdevel, linux-gpio, linux-input, linux-rdma, linux-scsi, nvdimm
Subsystem: pci driver for microsemi switchtec, pci subsystem, the rest · Maintainers: Kurt Schwemmer, Logan Gunthorpe, Bjorn Helgaas, Linus Torvalds

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
---
 drivers/pci/switch/switchtec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 82bfd18..95aabd0 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -1233,9 +1233,8 @@ static struct switchtec_dev *stdev_create(struct pci_dev *pdev)
 	cdev = &stdev->cdev;
 	cdev_init(cdev, &switchtec_fops);
 	cdev->owner = THIS_MODULE;
-	cdev->kobj.parent = &dev->kobj;
 
-	rc = cdev_add(&stdev->cdev, dev->devt, 1);
+	rc = device_add_cdev(dev, cdev);
 	if (rc)
 		goto err_cdev;
 
-- 
2.1.4

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help