diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-05-14 20:56:43 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-05-14 20:56:43 +0200 |
commit | a8bab1509e795f367db2e374fe600ecacf66e26b (patch) | |
tree | 97ccd68f1142da7cd372830ba5cab08c25495b6a /driver/platform.h | |
parent | 44a5c2b2d47dde5215171966eeef0acdadcaded3 (diff) |
add attribute (9.4)
Diffstat (limited to 'driver/platform.h')
-rw-r--r-- | driver/platform.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/driver/platform.h b/driver/platform.h index 3faaad5..cee82a7 100644 --- a/driver/platform.h +++ b/driver/platform.h @@ -3,6 +3,18 @@ #include <linux/types.h> #include <linux/platform_device.h> +ssize_t attr_show(struct device_driver*, char*); +ssize_t attr_store(struct device_driver*, const char*, size_t); + +static struct driver_attribute attr = { + .attr = { + .name = "attr", + .mode = 0644, + }, + .show = attr_show, + .store = attr_store, +}; + int lork_probe(struct platform_device*); int lork_remove(struct platform_device*); |