diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-15 18:19:42 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-15 18:19:42 +0200 |
commit | 3a0e12380b6316db215fd5c086fe6d8be108bd01 (patch) | |
tree | 6f402b5a9cb3729080b99476a169b4b637131663 | |
parent | 5254cc646177e0934db75550b44e297b4337ea75 (diff) |
slim down sources
-rw-r--r-- | driver/Makefile | 1 | ||||
-rw-r--r-- | driver/main.c | 12 | ||||
-rw-r--r-- | driver/main.h | 6 | ||||
-rw-r--r-- | driver/platform.c | 14 | ||||
-rw-r--r-- | driver/platform.h | 8 |
5 files changed, 12 insertions, 29 deletions
diff --git a/driver/Makefile b/driver/Makefile index f9cb359..8abe2c7 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -7,7 +7,6 @@ KERNEL := /lib/modules/$(RELEASE)/build # system, see [kbuild-obj-var] and [kbuild-module-makefile] in ../readme.md obj-m += lork.o lork-y += main.o -lork-y += platform.o # utility ifneq ($(shell id -u),0) diff --git a/driver/main.c b/driver/main.c index 4dd4b88..498bb0f 100644 --- a/driver/main.c +++ b/driver/main.c @@ -1,8 +1,14 @@ -#include <linux/init.h> -#include <linux/i2c.h> - #include "main.h" +int lork_probe(struct i2c_client * client) { + printk(KERN_INFO "%s()\n", __PRETTY_FUNCTION__); + return 0; +} + +void lork_remove(struct i2c_client * client) { + return; +} + module_i2c_driver(lork_driver); MODULE_LICENSE("Dual MIT/GPL"); diff --git a/driver/main.h b/driver/main.h index 77ebad5..059f277 100644 --- a/driver/main.h +++ b/driver/main.h @@ -1,9 +1,9 @@ #pragma once -#include <linux/of.h> -#include <linux/platform_device.h> +#include <linux/i2c.h> -#include "platform.h" +int lork_probe(struct i2c_client *); +void lork_remove(struct i2c_client *); static const struct of_device_id lork_match[] = { { .compatible = "lork-i2c" }, diff --git a/driver/platform.c b/driver/platform.c deleted file mode 100644 index db82d14..0000000 --- a/driver/platform.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "platform.h" - -#include <linux/platform_device.h> -#include <linux/types.h> - -int lork_probe(struct i2c_client * client) { - printk(KERN_INFO "%s()\n", __PRETTY_FUNCTION__); - return 0; -} - -void lork_remove(struct i2c_client * client) { - return; -} - diff --git a/driver/platform.h b/driver/platform.h deleted file mode 100644 index 1173c3a..0000000 --- a/driver/platform.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include <linux/platform_device.h> -#include <linux/i2c.h> - -int lork_probe(struct i2c_client *); -void lork_remove(struct i2c_client *); - |