file - sys_chmod not work (linux) -


its driver init code:

int res; int gpio_major=102; struct class *device_class = class_create(this_module, "gpio");  gpio_direction_input(s5pv210_gpj2(7)); gpio_direction_input(s5pv210_gpj3(0)); gpio_direction_input(s5pv210_gpj3(1));   res = register_chrdev(gpio_major, "gpio", &gpio_fops); device_create(device_class, null, mkdev(gpio_major, 0) , null, "gpio");  sys_chmod("/dev/gpio", 777);   return 0; 

i want add mod 777 driver file , compile with: crw------ default owner can access. why sys_chmod("/dev/gpio", 777) not works?


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -