tuxedo_io: Update id check data for uw on ioctl id check request

Should fix failing to identify uniwill device if tuxedo_io module
loaded before interface registration.
This commit is contained in:
Christoffer Sandberg 2021-10-04 14:55:48 +02:00
parent f066ef0318
commit 0747e94f89

View file

@ -346,6 +346,7 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
copy_result = copy_to_user((void *) arg, (void *) &id_check_clevo, sizeof(id_check_clevo)); copy_result = copy_to_user((void *) arg, (void *) &id_check_clevo, sizeof(id_check_clevo));
break; break;
case R_HWCHECK_UW: case R_HWCHECK_UW:
id_check_uniwill = uniwill_identify();
copy_result = copy_to_user((void *) arg, (void *) &id_check_uniwill, sizeof(id_check_uniwill)); copy_result = copy_to_user((void *) arg, (void *) &id_check_uniwill, sizeof(id_check_uniwill));
break; break;
} }
@ -380,7 +381,7 @@ static int __init tuxedo_io_init(void)
#ifdef DEBUG #ifdef DEBUG
if (id_check_clevo == 0 && id_check_uniwill == 0) { if (id_check_clevo == 0 && id_check_uniwill == 0) {
pr_debug("No matching hardware found\n"); pr_debug("No matching hardware found on module load\n");
} }
#endif #endif