18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci#include <linux/types.h> 38c2ecf20Sopenharmony_ci#include <linux/errno.h> 48c2ecf20Sopenharmony_ci#include <linux/uaccess.h> 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciint 78c2ecf20Sopenharmony_cistfiwx(u32 *frS, void *ea) 88c2ecf20Sopenharmony_ci{ 98c2ecf20Sopenharmony_ci#ifdef DEBUG 108c2ecf20Sopenharmony_ci printk("%s: %p %p\n", __func__, frS, ea); 118c2ecf20Sopenharmony_ci#endif 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci if (copy_to_user(ea, &frS[1], sizeof(frS[1]))) 148c2ecf20Sopenharmony_ci return -EFAULT; 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci return 0; 178c2ecf20Sopenharmony_ci} 18