- }
- break;
- case APCIOCGCPWR:
- if(put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, (__u8*) arg)) {
- return -EFAULT;
- }
- break;
- case APCIOCGBPORT:
- if(put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, (__u8*) arg)) {
- return -EFAULT;
- }
- break;
-
- case APCIOCSFANCTL:
- if(get_user(inarg, (__u8*) arg)) {
- return -EFAULT;
- }
- apc_writeb(inarg & APC_REGMASK, APC_FANCTL_REG);
- break;
- case APCIOCSCPWR:
- if(get_user(inarg, (__u8*) arg)) {
- return -EFAULT;
- }
- apc_writeb(inarg & APC_REGMASK, APC_CPOWER_REG);
- break;
- case APCIOCSBPORT:
- if(get_user(inarg, (__u8*) arg)) {
- return -EFAULT;
- }
- apc_writeb(inarg & APC_BPMASK, APC_BPORT_REG);
- break;
- default:
- return -EINVAL;
+ break;
+
+ case APCIOCGCPWR:
+ if (put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, arg))
+ return -EFAULT;
+ break;
+
+ case APCIOCGBPORT:
+ if (put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, arg))
+ return -EFAULT;
+ break;
+
+ case APCIOCSFANCTL:
+ if (get_user(inarg, arg))
+ return -EFAULT;
+ apc_writeb(inarg & APC_REGMASK, APC_FANCTL_REG);
+ break;
+ case APCIOCSCPWR:
+ if (get_user(inarg, arg))
+ return -EFAULT;
+ apc_writeb(inarg & APC_REGMASK, APC_CPOWER_REG);
+ break;
+ case APCIOCSBPORT:
+ if (get_user(inarg, arg))
+ return -EFAULT;
+ apc_writeb(inarg & APC_BPMASK, APC_BPORT_REG);
+ break;
+ default:
+ return -EINVAL;