Move the driver registry with the ishtp bus to the common interface file, which clients can include. Also rename __ishtp_cl_driver_register() to ishtp_cl_driver_register() and removed define for ishtp_cl_driver_register.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -10,6 +10,31 @@ · 9 unmodified lines | |||
| 10 | 10 | ||
| 11 | struct ishtp_cl_device; | 11 | struct ishtp_cl_device; |
| 12 | 12 | ||
| 13 | /** | ||
| 14 | * struct ishtp_cl_device - ISHTP device handle | ||
| 15 | * @driver: driver instance on a bus | ||
| 16 | * @name: Name of the device for probe | ||
| 17 | * @probe: driver callback for device probe | ||
| 18 | * @remove: driver callback on device removal | ||
| 19 | * | ||
| 20 | * Client drivers defines to get probed/removed for ISHTP client device. | ||
| 21 | */ | ||
| 22 | struct ishtp_cl_driver { | ||
| 23 | struct device_driver driver; | ||
| 24 | const char *name; | ||
| 25 | const guid_t *guid; | ||
| 26 | int (*probe)(struct ishtp_cl_device *dev); | ||
| 27 | int (*remove)(struct ishtp_cl_device *dev); | ||
| 28 | int (*reset)(struct ishtp_cl_device *dev); | ||
| 29 | const struct dev_pm_ops *pm; | ||
| 30 | }; | ||
| 31 | |||
| 32 | int ishtp_cl_driver_register(struct ishtp_cl_driver *driver, | ||
| 33 | struct module *owner); | ||
| 34 | void ishtp_cl_driver_unregister(struct ishtp_cl_driver *driver); | ||
| 35 | int ishtp_register_event_cb(struct ishtp_cl_device *device, | ||
| 36 | void (*read_cb)(struct ishtp_cl_device *)); | ||
| 37 | |||
| 13 | /* Get the device * from ishtp device instance */ | 38 | /* Get the device * from ishtp device instance */ |
| 14 | struct device *ishtp_device(struct ishtp_cl_device *cl_device); | 39 | struct device *ishtp_device(struct ishtp_cl_device *cl_device); |
| 15 | /* Trace interface for clients */ | 40 | /* Trace interface for clients */ |