Changeset 730 for GPL/branches/uniaud32-next/include/linux/device.h
- Timestamp:
- Sep 10, 2022, 12:08:43 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/include/linux/device.h
r719 r730 69 69 struct list_head dma_pools; /* dma pools (if dma'ble) */ 70 70 struct device_driver *driver; 71 void *driver_data; /* Driver data, set and get with 72 dev_set_drvdata/dev_get_drvdata */ 71 73 struct pm_dev *pm_dev; 72 74 char bus_id[20]; … … 149 151 extern struct device_driver *driver_find(const char *name, 150 152 struct bus_type *bus); 151 152 #define dev_set_drvdata(dev,ptr) ((dev)->private_data = (ptr))153 #define dev_get_drvdata(dev) (dev)->private_data154 153 155 154 #define MODULE_ALIAS_CHARDEV_MAJOR(x) … … 323 322 return NUMA_NO_NODE; 324 323 } 324 325 static inline void *dev_get_drvdata(const struct device *dev) 326 { 327 return dev->driver_data; 328 } 329 330 static inline void dev_set_drvdata(struct device *dev, void *data) 331 { 332 dev->driver_data = data; 333 } 334 325 335 #endif /* _LINUX_DEVICE_H */ 326 336
Note:
See TracChangeset
for help on using the changeset viewer.