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.
Unified · Split
| @@ -154,7 +154,7 @@ static int __init adummy_init(void) · 153 unmodified lines | |||
| 154 | err = -ENOMEM; | 154 | err = -ENOMEM; |
| 155 | goto out; | 155 | goto out; |
| 156 | } | 156 | } |
| 157 | atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, NULL); | 157 | atm_dev = atm_dev_register(DEV_LABEL, NULL, &adummy_ops, -1, NULL); |
| 158 | if (!atm_dev) { | 158 | if (!atm_dev) { |
| 159 | printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n"); | 159 | printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n"); |
| 160 | err = -ENODEV; | 160 | err = -ENODEV; |
| @@ -2244,7 +2244,8 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_ · 2243 unmodified lines | |||
| 2244 | goto out_reset; | 2244 | goto out_reset; |
| 2245 | } | 2245 | } |
| 2246 | 2246 | ||
| 2247 | dev->atm_dev = atm_dev_register (DEV_LABEL, &amb_ops, -1, NULL); | 2247 | dev->atm_dev = atm_dev_register (DEV_LABEL, &pci_dev->dev, &amb_ops, -1, |
| 2248 | NULL); | ||
| 2248 | if (!dev->atm_dev) { | 2249 | if (!dev->atm_dev) { |
| 2249 | PRINTD (DBG_ERR, "failed to register Madge ATM adapter"); | 2250 | PRINTD (DBG_ERR, "failed to register Madge ATM adapter"); |
| 2250 | err = -EINVAL; | 2251 | err = -EINVAL; |
| @@ -366,7 +366,7 @@ static int atmtcp_create(int itf,int persist,struct atm_dev **result) · 365 unmodified lines | |||
| 366 | if (!dev_data) | 366 | if (!dev_data) |
| 367 | return -ENOMEM; | 367 | return -ENOMEM; |
| 368 | 368 | ||
| 369 | dev = atm_dev_register(DEV_LABEL,&atmtcp_v_dev_ops,itf,NULL); | 369 | dev = atm_dev_register(DEV_LABEL,NULL,&atmtcp_v_dev_ops,itf,NULL); |
| 370 | if (!dev) { | 370 | if (!dev) { |
| 371 | kfree(dev_data); | 371 | kfree(dev_data); |
| 372 | return itf == -1 ? -ENOMEM : -EBUSY; | 372 | return itf == -1 ? -ENOMEM : -EBUSY; |
| @@ -2244,7 +2244,7 @@ static int __devinit eni_init_one(struct pci_dev *pci_dev, · 2243 unmodified lines | |||
| 2244 | &zeroes); | 2244 | &zeroes); |
| 2245 | if (!cpu_zeroes) goto out1; | 2245 | if (!cpu_zeroes) goto out1; |
| 2246 | } | 2246 | } |
| 2247 | dev = atm_dev_register(DEV_LABEL,&ops,-1,NULL); | 2247 | dev = atm_dev_register(DEV_LABEL, &pci_dev->dev, &ops, -1, NULL); |
| 2248 | if (!dev) goto out2; | 2248 | if (!dev) goto out2; |
| 2249 | pci_set_drvdata(pci_dev, dev); | 2249 | pci_set_drvdata(pci_dev, dev); |
| 2250 | eni_dev->pci_dev = pci_dev; | 2250 | eni_dev->pci_dev = pci_dev; |
| @@ -1911,7 +1911,7 @@ static int __devinit firestream_init_one (struct pci_dev *pci_dev, · 1910 unmodified lines | |||
| 1911 | fs_dev, sizeof (struct fs_dev)); | 1911 | fs_dev, sizeof (struct fs_dev)); |
| 1912 | if (!fs_dev) | 1912 | if (!fs_dev) |
| 1913 | goto err_out; | 1913 | goto err_out; |
| 1914 | atm_dev = atm_dev_register("fs", &ops, -1, NULL); | 1914 | atm_dev = atm_dev_register("fs", &pci_dev->dev, &ops, -1, NULL); |
| 1915 | if (!atm_dev) | 1915 | if (!atm_dev) |
| 1916 | goto err_out_free_fs_dev; | 1916 | goto err_out_free_fs_dev; |
| 1917 | 1917 | ||
| @@ -2567,14 +2567,14 @@ release: · 2566 unmodified lines | |||
| 2567 | 2567 | ||
| 2568 | 2568 | ||
| 2569 | static int __devinit | 2569 | static int __devinit |
| 2570 | fore200e_register(struct fore200e* fore200e) | 2570 | fore200e_register(struct fore200e* fore200e, struct device *parent) |
| 2571 | { | 2571 | { |
| 2572 | struct atm_dev* atm_dev; | 2572 | struct atm_dev* atm_dev; |
| 2573 | 2573 | ||
| 2574 | DPRINTK(2, "device %s being registered\n", fore200e->name); | 2574 | DPRINTK(2, "device %s being registered\n", fore200e->name); |
| 2575 | 2575 | ||
| 2576 | atm_dev = atm_dev_register(fore200e->bus->proc_name, &fore200e_ops, -1, | 2576 | atm_dev = atm_dev_register(fore200e->bus->proc_name, parent, &fore200e_ops, |
| 2577 | NULL); | 2577 | -1, NULL); |
| 2578 | if (atm_dev == NULL) { | 2578 | if (atm_dev == NULL) { |
| 2579 | printk(FORE200E "unable to register device %s\n", fore200e->name); | 2579 | printk(FORE200E "unable to register device %s\n", fore200e->name); |
| 2580 | return -ENODEV; | 2580 | return -ENODEV; |
| @@ -2594,9 +2594,9 @@ fore200e_register(struct fore200e* fore200e) · 13 unmodified lines | |||
| 2594 | 2594 | ||
| 2595 | 2595 | ||
| 2596 | static int __devinit | 2596 | static int __devinit |
| 2597 | fore200e_init(struct fore200e* fore200e) | 2597 | fore200e_init(struct fore200e* fore200e, struct device *parent) |
| 2598 | { | 2598 | { |
| 2599 | if (fore200e_register(fore200e) < 0) | 2599 | if (fore200e_register(fore200e, parent) < 0) |
| 2600 | return -ENODEV; | 2600 | return -ENODEV; |
| 2601 | 2601 | ||
| 2602 | if (fore200e->bus->configure(fore200e) < 0) | 2602 | if (fore200e->bus->configure(fore200e) < 0) |
| @@ -2662,7 +2662,7 @@ static int __devinit fore200e_sba_probe(struct platform_device *op, · 59 unmodified lines | |||
| 2662 | 2662 | ||
| 2663 | sprintf(fore200e->name, "%s-%d", bus->model_name, index); | 2663 | sprintf(fore200e->name, "%s-%d", bus->model_name, index); |
| 2664 | 2664 | ||
| 2665 | err = fore200e_init(fore200e); | 2665 | err = fore200e_init(fore200e, &op->dev); |
| 2666 | if (err < 0) { | 2666 | if (err < 0) { |
| 2667 | fore200e_shutdown(fore200e); | 2667 | fore200e_shutdown(fore200e); |
| 2668 | kfree(fore200e); | 2668 | kfree(fore200e); |
| @@ -2740,7 +2740,7 @@ fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent · 71 unmodified lines | |||
| 2740 | 2740 | ||
| 2741 | sprintf(fore200e->name, "%s-%d", bus->model_name, index); | 2741 | sprintf(fore200e->name, "%s-%d", bus->model_name, index); |
| 2742 | 2742 | ||
| 2743 | err = fore200e_init(fore200e); | 2743 | err = fore200e_init(fore200e, &pci_dev->dev); |
| 2744 | if (err < 0) { | 2744 | if (err < 0) { |
| 2745 | fore200e_shutdown(fore200e); | 2745 | fore200e_shutdown(fore200e); |
| 2746 | goto out_free; | 2746 | goto out_free; |
| @@ -366,7 +366,7 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) · 365 unmodified lines | |||
| 366 | goto init_one_failure; | 366 | goto init_one_failure; |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | atm_dev = atm_dev_register(DEV_LABEL, &he_ops, -1, NULL); | 369 | atm_dev = atm_dev_register(DEV_LABEL, &pci_dev->dev, &he_ops, -1, NULL); |
| 370 | if (!atm_dev) { | 370 | if (!atm_dev) { |
| 371 | err = -ENODEV; | 371 | err = -ENODEV; |
| 372 | goto init_one_failure; | 372 | goto init_one_failure; |
| @@ -2733,7 +2733,8 @@ static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_ · 2732 unmodified lines | |||
| 2733 | PRINTD(DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", | 2733 | PRINTD(DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", |
| 2734 | iobase, irq, membase); | 2734 | iobase, irq, membase); |
| 2735 | 2735 | ||
| 2736 | dev->atm_dev = atm_dev_register(DEV_LABEL, &hrz_ops, -1, NULL); | 2736 | dev->atm_dev = atm_dev_register(DEV_LABEL, &pci_dev->dev, &hrz_ops, -1, |
| 2737 | NULL); | ||
| 2737 | if (!(dev->atm_dev)) { | 2738 | if (!(dev->atm_dev)) { |
| 2738 | PRINTD(DBG_ERR, "failed to register Madge ATM adapter"); | 2739 | PRINTD(DBG_ERR, "failed to register Madge ATM adapter"); |
| 2739 | err = -EINVAL; | 2740 | err = -EINVAL; |
| @@ -3698,7 +3698,8 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id) · 3697 unmodified lines | |||
| 3698 | goto err_out_iounmap; | 3698 | goto err_out_iounmap; |
| 3699 | } | 3699 | } |
| 3700 | 3700 | ||
| 3701 | dev = atm_dev_register("idt77252", &idt77252_ops, -1, NULL); | 3701 | dev = atm_dev_register("idt77252", &pcidev->dev, &idt77252_ops, -1, |
| 3702 | NULL); | ||
| 3702 | if (!dev) { | 3703 | if (!dev) { |
| 3703 | printk("%s: can't register atm device\n", card->name); | 3704 | printk("%s: can't register atm device\n", card->name); |
| 3704 | err = -EIO; | 3705 | err = -EIO; |
| @@ -3172,7 +3172,7 @@ static int __devinit ia_init_one(struct pci_dev *pdev, · 3171 unmodified lines | |||
| 3172 | ret = -ENODEV; | 3172 | ret = -ENODEV; |
| 3173 | goto err_out_free_iadev; | 3173 | goto err_out_free_iadev; |
| 3174 | } | 3174 | } |
| 3175 | dev = atm_dev_register(DEV_LABEL, &ops, -1, NULL); | 3175 | dev = atm_dev_register(DEV_LABEL, &pdev->dev, &ops, -1, NULL); |
| 3176 | if (!dev) { | 3176 | if (!dev) { |
| 3177 | ret = -ENOMEM; | 3177 | ret = -ENOMEM; |
| 3178 | goto err_out_disable_dev; | 3178 | goto err_out_disable_dev; |
| @@ -2591,7 +2591,7 @@ static int __devinit lanai_init_one(struct pci_dev *pci, · 2590 unmodified lines | |||
| 2591 | return -ENOMEM; | 2591 | return -ENOMEM; |
| 2592 | } | 2592 | } |
| 2593 | 2593 | ||
| 2594 | atmdev = atm_dev_register(DEV_LABEL, &ops, -1, NULL); | 2594 | atmdev = atm_dev_register(DEV_LABEL, &pci->dev, &ops, -1, NULL); |
| 2595 | if (atmdev == NULL) { | 2595 | if (atmdev == NULL) { |
| 2596 | printk(KERN_ERR DEV_LABEL | 2596 | printk(KERN_ERR DEV_LABEL |
| 2597 | ": couldn't register atm device!\n"); | 2597 | ": couldn't register atm device!\n"); |
| @@ -771,7 +771,8 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) · 770 unmodified lines | |||
| 771 | } | 771 | } |
| 772 | 772 | ||
| 773 | /* Register device */ | 773 | /* Register device */ |
| 774 | card->atmdev = atm_dev_register("nicstar", &atm_ops, -1, NULL); | 774 | card->atmdev = atm_dev_register("nicstar", &card->pcidev->dev, &atm_ops, |
| 775 | -1, NULL); | ||
| 775 | if (card->atmdev == NULL) { | 776 | if (card->atmdev == NULL) { |
| 776 | printk("nicstar%d: can't register device.\n", i); | 777 | printk("nicstar%d: can't register device.\n", i); |
| 777 | error = 17; | 778 | error = 17; |
| @@ -166,7 +166,7 @@ static irqreturn_t solos_irq(int irq, void *dev_id); · 165 unmodified lines | |||
| 166 | static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci); | 166 | static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci); |
| 167 | static int list_vccs(int vci); | 167 | static int list_vccs(int vci); |
| 168 | static void release_vccs(struct atm_dev *dev); | 168 | static void release_vccs(struct atm_dev *dev); |
| 169 | static int atm_init(struct solos_card *); | 169 | static int atm_init(struct solos_card *, struct device *); |
| 170 | static void atm_remove(struct solos_card *); | 170 | static void atm_remove(struct solos_card *); |
| 171 | static int send_command(struct solos_card *card, int dev, const char *buf, size_t size); | 171 | static int send_command(struct solos_card *card, int dev, const char *buf, size_t size); |
| 172 | static void solos_bh(unsigned long); | 172 | static void solos_bh(unsigned long); |
| @@ -1210,7 +1210,7 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id) · 1037 unmodified lines | |||
| 1210 | if (db_firmware_upgrade) | 1210 | if (db_firmware_upgrade) |
| 1211 | flash_upgrade(card, 3); | 1211 | flash_upgrade(card, 3); |
| 1212 | 1212 | ||
| 1213 | err = atm_init(card); | 1213 | err = atm_init(card, &dev->dev); |
| 1214 | if (err) | 1214 | if (err) |
| 1215 | goto out_free_irq; | 1215 | goto out_free_irq; |
| 1216 | 1216 | ||
| @@ -1233,7 +1233,7 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id) · 16 unmodified lines | |||
| 1233 | return err; | 1233 | return err; |
| 1234 | } | 1234 | } |
| 1235 | 1235 | ||
| 1236 | static int atm_init(struct solos_card *card) | 1236 | static int atm_init(struct solos_card *card, struct device *parent) |
| 1237 | { | 1237 | { |
| 1238 | int i; | 1238 | int i; |
| 1239 | 1239 | ||
| @@ -1244,7 +1244,7 @@ static int atm_init(struct solos_card *card) · 4 unmodified lines | |||
| 1244 | skb_queue_head_init(&card->tx_queue[i]); | 1244 | skb_queue_head_init(&card->tx_queue[i]); |
| 1245 | skb_queue_head_init(&card->cli_queue[i]); | 1245 | skb_queue_head_init(&card->cli_queue[i]); |
| 1246 | 1246 | ||
| 1247 | card->atmdev[i] = atm_dev_register("solos-pci", &fpga_ops, -1, NULL); | 1247 | card->atmdev[i] = atm_dev_register("solos-pci", parent, &fpga_ops, -1, NULL); |
| 1248 | if (!card->atmdev[i]) { | 1248 | if (!card->atmdev[i]) { |
| 1249 | dev_err(&card->dev->dev, "Could not register ATM device %d\n", i); | 1249 | dev_err(&card->dev->dev, "Could not register ATM device %d\n", i); |
| 1250 | atm_remove(card); | 1250 | atm_remove(card); |
| @@ -1597,7 +1597,7 @@ static int __devinit zatm_init_one(struct pci_dev *pci_dev, · 1596 unmodified lines | |||
| 1597 | goto out; | 1597 | goto out; |
| 1598 | } | 1598 | } |
| 1599 | 1599 | ||
| 1600 | dev = atm_dev_register(DEV_LABEL, &ops, -1, NULL); | 1600 | dev = atm_dev_register(DEV_LABEL, &pci_dev->dev, &ops, -1, NULL); |
| 1601 | if (!dev) | 1601 | if (!dev) |
| 1602 | goto out_free; | 1602 | goto out_free; |
| 1603 | 1603 | ||
| @@ -951,7 +951,9 @@ static int usbatm_atm_init(struct usbatm_data *instance) · 950 unmodified lines | |||
| 951 | * condition: callbacks we register can be executed at once, before we have | 951 | * condition: callbacks we register can be executed at once, before we have |
| 952 | * initialized the struct atm_dev. To protect against this, all callbacks | 952 | * initialized the struct atm_dev. To protect against this, all callbacks |
| 953 | * abort if atm_dev->dev_data is NULL. */ | 953 | * abort if atm_dev->dev_data is NULL. */ |
| 954 | atm_dev = atm_dev_register(instance->driver_name, &usbatm_atm_devops, -1, NULL); | 954 | atm_dev = atm_dev_register(instance->driver_name, |
| 955 | &instance->usb_intf->dev, &usbatm_atm_devops, | ||
| 956 | -1, NULL); | ||
| 955 | if (!atm_dev) { | 957 | if (!atm_dev) { |
| 956 | usb_err(instance, "%s: failed to register ATM device!\n", __func__); | 958 | usb_err(instance, "%s: failed to register ATM device!\n", __func__); |
| 957 | return -1; | 959 | return -1; |
| @@ -966,14 +968,6 @@ static int usbatm_atm_init(struct usbatm_data *instance) · 8 unmodified lines | |||
| 966 | /* temp init ATM device, set to 128kbit */ | 968 | /* temp init ATM device, set to 128kbit */ |
| 967 | atm_dev->link_rate = 128 * 1000 / 424; | 969 | atm_dev->link_rate = 128 * 1000 / 424; |
| 968 | 970 | ||
| 969 | ret = sysfs_create_link(&atm_dev->class_dev.kobj, | ||
| 970 | &instance->usb_intf->dev.kobj, "device"); | ||
| 971 | if (ret) { | ||
| 972 | atm_err(instance, "%s: sysfs_create_link failed: %d\n", | ||
| 973 | __func__, ret); | ||
| 974 | goto fail_sysfs; | ||
| 975 | } | ||
| 976 | |||
| 977 | if (instance->driver->atm_start && ((ret = instance->driver->atm_start(instance, atm_dev)) < 0)) { | 971 | if (instance->driver->atm_start && ((ret = instance->driver->atm_start(instance, atm_dev)) < 0)) { |
| 978 | atm_err(instance, "%s: atm_start failed: %d!\n", __func__, ret); | 972 | atm_err(instance, "%s: atm_start failed: %d!\n", __func__, ret); |
| 979 | goto fail; | 973 | goto fail; |
| @@ -992,8 +986,6 @@ static int usbatm_atm_init(struct usbatm_data *instance) · 12 unmodified lines | |||
| 992 | return 0; | 986 | return 0; |
| 993 | 987 | ||
| 994 | fail: | 988 | fail: |
| 995 | sysfs_remove_link(&atm_dev->class_dev.kobj, "device"); | ||
| 996 | fail_sysfs: | ||
| 997 | instance->atm_dev = NULL; | 989 | instance->atm_dev = NULL; |
| 998 | atm_dev_deregister(atm_dev); /* usbatm_atm_dev_close will eventually be called */ | 990 | atm_dev_deregister(atm_dev); /* usbatm_atm_dev_close will eventually be called */ |
| 999 | return ret; | 991 | return ret; |
| @@ -1329,7 +1321,6 @@ void usbatm_usb_disconnect(struct usb_interface *intf) · 329 unmodified lines | |||
| 1329 | 1321 | ||
| 1330 | /* ATM finalize */ | 1322 | /* ATM finalize */ |
| 1331 | if (instance->atm_dev) { | 1323 | if (instance->atm_dev) { |
| 1332 | sysfs_remove_link(&instance->atm_dev->class_dev.kobj, "device"); | ||
| 1333 | atm_dev_deregister(instance->atm_dev); | 1324 | atm_dev_deregister(instance->atm_dev); |
| 1334 | instance->atm_dev = NULL; | 1325 | instance->atm_dev = NULL; |
| 1335 | } | 1326 | } |
| @@ -427,8 +427,10 @@ extern rwlock_t vcc_sklist_lock; · 426 unmodified lines | |||
| 427 | 427 | ||
| 428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) | 428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) |
| 429 | 429 | ||
| 430 | struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops, | 430 | struct atm_dev *atm_dev_register(const char *type, struct device *parent, |
| 431 | int number,unsigned long *flags); /* number == -1: pick first available */ | 431 | const struct atmdev_ops *ops, |
| 432 | int number, /* -1 == pick first available */ | ||
| 433 | unsigned long *flags); | ||
| 432 | struct atm_dev *atm_dev_lookup(int number); | 434 | struct atm_dev *atm_dev_lookup(int number); |
| 433 | void atm_dev_deregister(struct atm_dev *dev); | 435 | void atm_dev_deregister(struct atm_dev *dev); |
| 434 | 436 | ||
| @@ -143,12 +143,13 @@ static struct class atm_class = { · 142 unmodified lines | |||
| 143 | .dev_uevent = atm_uevent, | 143 | .dev_uevent = atm_uevent, |
| 144 | }; | 144 | }; |
| 145 | 145 | ||
| 146 | int atm_register_sysfs(struct atm_dev *adev) | 146 | int atm_register_sysfs(struct atm_dev *adev, struct device *parent) |
| 147 | { | 147 | { |
| 148 | struct device *cdev = &adev->class_dev; | 148 | struct device *cdev = &adev->class_dev; |
| 149 | int i, j, err; | 149 | int i, j, err; |
| 150 | 150 | ||
| 151 | cdev->class = &atm_class; | 151 | cdev->class = &atm_class; |
| 152 | cdev->parent = parent; | ||
| 152 | dev_set_drvdata(cdev, adev); | 153 | dev_set_drvdata(cdev, adev); |
| 153 | 154 | ||
| 154 | dev_set_name(cdev, "%s%d", adev->type, adev->number); | 155 | dev_set_name(cdev, "%s%d", adev->type, adev->number); |
| @@ -74,8 +74,9 @@ struct atm_dev *atm_dev_lookup(int number) · 73 unmodified lines | |||
| 74 | } | 74 | } |
| 75 | EXPORT_SYMBOL(atm_dev_lookup); | 75 | EXPORT_SYMBOL(atm_dev_lookup); |
| 76 | 76 | ||
| 77 | struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops, | 77 | struct atm_dev *atm_dev_register(const char *type, struct device *parent, |
| 78 | int number, unsigned long *flags) | 78 | const struct atmdev_ops *ops, int number, |
| 79 | unsigned long *flags) | ||
| 79 | { | 80 | { |
| 80 | struct atm_dev *dev, *inuse; | 81 | struct atm_dev *dev, *inuse; |
| 81 | 82 | ||
| @@ -115,7 +116,7 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops, · 33 unmodified lines | |||
| 115 | goto out_fail; | 116 | goto out_fail; |
| 116 | } | 117 | } |
| 117 | 118 | ||
| 118 | if (atm_register_sysfs(dev) < 0) { | 119 | if (atm_register_sysfs(dev, parent) < 0) { |
| 119 | pr_err("atm_register_sysfs failed for dev %s\n", type); | 120 | pr_err("atm_register_sysfs failed for dev %s\n", type); |
| 120 | atm_proc_dev_deregister(dev); | 121 | atm_proc_dev_deregister(dev); |
| 121 | goto out_fail; | 122 | goto out_fail; |
| @@ -42,6 +42,6 @@ static inline void atm_proc_dev_deregister(struct atm_dev *dev) · 41 unmodified lines | |||
| 42 | 42 | ||
| 43 | #endif /* CONFIG_PROC_FS */ | 43 | #endif /* CONFIG_PROC_FS */ |
| 44 | 44 | ||
| 45 | int atm_register_sysfs(struct atm_dev *adev); | 45 | int atm_register_sysfs(struct atm_dev *adev, struct device *parent); |
| 46 | void atm_unregister_sysfs(struct atm_dev *adev); | 46 | void atm_unregister_sysfs(struct atm_dev *adev); |
| 47 | #endif | 47 | #endif |