copy_from_user
copy_from_user - 百度百科
copy_from_user用于将用户空间的数据传送到内核空间。
case RALINK_GPIO_LED_SET: #ifdef CONFIG_RALINK_GPIO_LED copy_from_user(&led, (ralink_gpio_led_info *)arg, sizeof(led)); ralink_gpio_led_set(led); #else printk(KERN_ERR NAME ": gpio led support not built\n"); #endif break;
echo向字符设备写数据
open close ioctl....
fopen只能写文件...