If CONFIG_PM is not set, the pm_ptr() will ensure that the struct dev_pm_ops and callbacks are removed without the need for __maybe_unused markings. In this case we can't simply use DEFINE_RUNTIME_DEV_PM_OPS() because that would provide suspend and resume functions without the checks...
206 int (*suspend)(struct device *dev, pm_message_t state); 207 int (*resume)(struct device *dev); 208 209 const struct kobj_ns_type_operations *ns_type; 210 const void *(*namespace)(struct device *dev); 211 212 const struct dev_pm_ops *pm; 213 214 struct subsys_private *p; ...
int (*remove)(struct device *dev); void (*shutdown)(struct device *dev); int (*online)(struct device *dev); int (*offline)(struct device *dev); int (*suspend)(struct device *dev, pm_message_t state); int (*resume)(struct device *dev); const struct dev_pm_ops *pm; const str...
int (*uevent)(struct device *dev, struct kobj_uevent_env *env); char *(*devnode)(struct device *dev, umode_t *mode, kuid_t *uid, kgid_t *gid); void (*release)(struct device *dev); const struct dev_pm_ops *pm; }; 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13....
static int sysctl_pm_do_suspend(ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *fpos) { int retval, mode; @@ -198,13 +198,13 @@ static int try_set_cmode(int new_cmode) } static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, ...
void(*adjust_link)(struct net_device *dev); }; phy_driverstructphy_driver{ structmdio_driver_commonmdiodrv; u32 phy_id; char*name; u32 phy_id_mask; u32 features; u32 flags; constvoid*driver_data; int(*soft_reset)(struct phy_device *phydev); ...
struct pm* next; const char* name; void(*init)(void); void(*deinit(void); void* condition; }; static struct pm pm_list; static uint8_t pm_num; static uint8_t pm_status; int pm_register(const struct pm* pm , const char* name) ...
struct tty_struct { int magic; struct kref kref; struct device *dev; // 对应的 tty_driver struct tty_driver *driver; // static const struct tty_operations uart_ops; const struct tty_operations *ops; int index; /* Protects ldisc changes: Lock tty not pty */ struct ld_semaphore ldisc_...
module can't handle CRTP within a struct on 17.10.0 Preview 5 Closed - Fixed110 2Votes MPMathieu Le Pape -Reported Apr 25, 2024 8:59 AM [severity:I’m unable to use this version] When updating to 17.10.0 Preview 5, the example below does not compile any...
上节中,除了简单的框架,我们还看到了一个和总线驱动相关的结构体bus_type 。这个结构体的定义在include/linux/device.h 中。本节先简单介绍结构体中的成员,再对每个成员作详细描述。[cpp]01.s t r u c t b u s _t y p e { 02.c o n s t c h a r *n a m e ; 03.s t ...