]> rtime.felk.cvut.cz Git - shark/motorek-5200.git/commitdiff
Each device has a unique name
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 15 Jan 2009 16:40:14 +0000 (17:40 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 15 Jan 2009 16:40:14 +0000 (17:40 +0100)
motorek.c
test

index b0c15e27ad7f529c95c91cd2db10d6f51534c23a..205297f7b8818d20c3648d540f235781224fb625 100644 (file)
--- a/motorek.c
+++ b/motorek.c
@@ -214,7 +214,7 @@ static int __init motorek_init_module(void)
 
        for_each_node_by_type(dn, "motorek") {
                if (!of_find_device_by_node(dn)) {
-                       dev = of_platform_device_create(dn, "motorek", NULL);
+                       dev = of_platform_device_create(dn, NULL, NULL);
                        if (!dev)
                                return -ENOMEM;
                }
diff --git a/test b/test
index fd5443c00ffb484d87024b5057d1255f6369cbc0..877bff3aa541b8beb3656ad48597eaeb1f471902 100755 (executable)
--- a/test
+++ b/test
@@ -12,7 +12,7 @@ rm /lib/modules/`uname -r`/*;
 cp /home/motorek.ko /lib/modules/`uname -r`;
 depmod;
 modprobe motorek;
-MDEV=`ls -d /sys/devices/motorek|head`
+MDEV=`ls -d /sys/devices/motorek.*|head`
 echo "echo 50 > $MDEV/action"
 echo 50 > $MDEV/action
 /bin/sh -l