From a8bab1509e795f367db2e374fe600ecacf66e26b Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 14 May 2024 20:56:43 +0200 Subject: add attribute (9.4) --- driver/platform.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'driver/platform.h') 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 #include +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*); -- cgit v1.2.3