Ret=the copy_from_user (wbuf, buf, len);
If (ret!=0)
{
Printk (" failed to copy the from user \ n ");
return -1;
}
If (wbuf [0]=='0')
{
* GPJ2DAT_VA & amp;=~ 0 xf.
* GPJ2DAT_VA |=0 xe;
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Copyright statement: this article to CSDN blogger (ZJE_ANDY) of the original articles, follow BY CC 4.0 - SA the copyright agreement, reproduced and this statement, please attach the original source link
The original link: https://blog.csdn.net/u014453898/article/details/60144021
CodePudding user response:
The user space and kernel space memory cannot be accessed directly, only through the copy_from_user and copy_to_user interact