X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Flinux%2Fatmdev.h;h=2096e5c7282724fbd3da6085bcbdfe87823c9c1f;hb=b3fba8da653999c67d7517050f196e92da6f8d3b;hp=1eb238affb124fe8d657cda89f55b2a627142eb8;hpb=050335db2a777ffaa859d77beb05fffe9e8c5ae9;p=firefly-linux-kernel-4.4.55.git diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 1eb238affb12..2096e5c72827 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h @@ -209,6 +209,7 @@ struct atm_cirange { #ifdef __KERNEL__ +#include #include /* wait_queue_head_t */ #include /* struct timeval */ #include @@ -358,6 +359,7 @@ struct atm_dev { struct proc_dir_entry *proc_entry; /* proc entry */ char *proc_name; /* proc entry name */ #endif + struct class_device class_dev; /* sysfs class device */ struct list_head dev_list; /* linkage */ }; @@ -459,7 +461,7 @@ static inline void atm_dev_put(struct atm_dev *dev) BUG_ON(!test_bit(ATM_DF_REMOVED, &dev->flags)); if (dev->ops->dev_close) dev->ops->dev_close(dev); - kfree(dev); + class_device_put(&dev->class_dev); } }