From bc21587539cb1c15eaee316ec106d69c7a57c4dd Mon Sep 17 00:00:00 2001 From: seantywork Date: Tue, 18 Nov 2025 00:28:10 +0000 Subject: [PATCH] dt --- kdev-gpio-dt/kdev_gpio.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/kdev-gpio-dt/kdev_gpio.c b/kdev-gpio-dt/kdev_gpio.c index bf94806..20320c2 100644 --- a/kdev-gpio-dt/kdev_gpio.c +++ b/kdev-gpio-dt/kdev_gpio.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -41,24 +42,7 @@ static int __init kdev_gpio_init(void){ } } } - struct device* d = container_of(&dn,struct device, of_node); - if(d == NULL){ - of_node_put(dn); - printk("failed to get device\n"); - return -1; - } - if(d->init_name != NULL){ - printk("device init name: %s\n", d->init_name); - } - struct gpio_chip* gc = container_of(&d,struct gpio_chip, parent); - if(gc != NULL){ - printk("got gc\n"); - if(gc->label != NULL){ - printk("gc label: %d\n", gc->base); - } - } - printk("kdev_gpio: init\n"); return 0; } -- 2.43.0