diff options
author | Arend van Spriel <aspriel@gmail.com> | 2018-01-11 09:36:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-23 09:47:05 +0100 |
commit | 3c47d19ff4dccf1500c33bcbe3b5bc804907a0da (patch) | |
tree | 4bb4a54a7099b3048d32698728e0dbe5e5bf3adb /include/linux/device.h | |
parent | 36d1d09af1b97113cd014fd50694000ac3ca2824 (diff) | |
download | lwn-3c47d19ff4dccf1500c33bcbe3b5bc804907a0da.tar.gz lwn-3c47d19ff4dccf1500c33bcbe3b5bc804907a0da.zip |
drivers: base: add coredump driver ops
This adds the coredump driver operation. When the driver defines it
a coredump file is added in the sysfs folder of the device upon
driver binding. The file is removed when the driver is unbound.
User-space can trigger a coredump for this device by echo'ing to
the coredump file.
Signed-off-by: Arend van Spriel <aspriel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 46cece519fb9..cd3b47e271b4 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -287,6 +287,7 @@ struct device_driver { const struct attribute_group **groups; const struct dev_pm_ops *pm; + int (*coredump) (struct device *dev); struct driver_private *p; }; @@ -300,7 +301,6 @@ extern struct device_driver *driver_find(const char *name, extern int driver_probe_done(void); extern void wait_for_device_probe(void); - /* sysfs interface for exporting driver attributes */ struct driver_attribute { |