Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9ca676b authored by Dan Williams's avatar Dan Williams Committed by David S. Miller
Browse files

atm: correct sysfs 'device' link creation and parent relationships



The ATM subsystem was incorrectly creating the 'device' link for ATM
nodes in sysfs.  This led to incorrect device/parent relationships
exposed by sysfs and udev.  Instead of rolling the 'device' link by hand
in the generic ATM code, pass each ATM driver's bus device down to the
sysfs code and let sysfs do this stuff correctly.

Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb890ae7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ static int __init adummy_init(void)
		err = -ENOMEM;
		goto out;
	}
	atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, NULL);
	atm_dev = atm_dev_register(DEV_LABEL, NULL, &adummy_ops, -1, NULL);
	if (!atm_dev) {
		printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n");
		err = -ENODEV;
+2 −1
Original line number Diff line number Diff line
@@ -2244,7 +2244,8 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_
		goto out_reset;
	}

	dev->atm_dev = atm_dev_register (DEV_LABEL, &amb_ops, -1, NULL);
	dev->atm_dev = atm_dev_register (DEV_LABEL, &pci_dev->dev, &amb_ops, -1,
					 NULL);
	if (!dev->atm_dev) {
		PRINTD (DBG_ERR, "failed to register Madge ATM adapter");
		err = -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@ static int atmtcp_create(int itf,int persist,struct atm_dev **result)
	if (!dev_data)
		return -ENOMEM;

	dev = atm_dev_register(DEV_LABEL,&atmtcp_v_dev_ops,itf,NULL);
	dev = atm_dev_register(DEV_LABEL,NULL,&atmtcp_v_dev_ops,itf,NULL);
	if (!dev) {
		kfree(dev_data);
		return itf == -1 ? -ENOMEM : -EBUSY;
+1 −1
Original line number Diff line number Diff line
@@ -2244,7 +2244,7 @@ static int __devinit eni_init_one(struct pci_dev *pci_dev,
		    &zeroes);
		if (!cpu_zeroes) goto out1;
	}
	dev = atm_dev_register(DEV_LABEL,&ops,-1,NULL);
	dev = atm_dev_register(DEV_LABEL, &pci_dev->dev, &ops, -1, NULL);
	if (!dev) goto out2;
	pci_set_drvdata(pci_dev, dev);
	eni_dev->pci_dev = pci_dev;
+1 −1
Original line number Diff line number Diff line
@@ -1911,7 +1911,7 @@ static int __devinit firestream_init_one (struct pci_dev *pci_dev,
		    fs_dev, sizeof (struct fs_dev));
	if (!fs_dev)
		goto err_out;
	atm_dev = atm_dev_register("fs", &ops, -1, NULL);
	atm_dev = atm_dev_register("fs", &pci_dev->dev, &ops, -1, NULL);
	if (!atm_dev)
		goto err_out_free_fs_dev;
  
Loading