From 95a33953137f7e33e63599953342dfc66daf2c18 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Wed, 4 Jun 2025 10:53:23 +0100 Subject: [PATCH] remove proc stuff --- driver/counter.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/driver/counter.c b/driver/counter.c index 1cc91fd..dd73f2d 100644 --- a/driver/counter.c +++ b/driver/counter.c @@ -9,7 +9,7 @@ /* Meta Information */ MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Johannes 4 GNU/Linux"); +MODULE_AUTHOR("Wolfgang Hottgenroth"); MODULE_DESCRIPTION("A simple LKM to parse the device tree for a specific device and its properties"); /* Declate the probe and remove functions */ @@ -35,25 +35,6 @@ static struct platform_driver my_driver = { /* GPIO variable */ static struct gpio_desc *my_led = NULL; -static struct proc_dir_entry *proc_file; - -/** - * @brief Write data to buffer - */ -static ssize_t my_write(struct file *File, const char *user_buffer, size_t count, loff_t *offs) { - switch (user_buffer[0]) { - case '0': - case '1': - gpiod_set_value(my_led, user_buffer[0] - '0'); - default: - break; - } - return count; -} - -static struct proc_ops fops = { - .proc_write = my_write, -}; /** * @brief This function is called on loading the driver @@ -100,15 +81,6 @@ static int dt_probe(struct platform_device *pdev) { return -1 * IS_ERR(my_led); } - /* Creating procfs file */ - proc_file = proc_create("my-led", 0666, NULL, &fops); - if(proc_file == NULL) { - printk("procfs_test - Error creating /proc/my-led\n"); - gpiod_put(my_led); - return -ENOMEM; - } - - return 0; } @@ -118,7 +90,6 @@ static int dt_probe(struct platform_device *pdev) { static void dt_remove(struct platform_device *pdev) { printk("dt_gpio - Now I am in the remove function\n"); gpiod_put(my_led); - proc_remove(proc_file); } /**