Update broken web addresses in the kernel.
[deliverable/linux.git] / drivers / char / apm-emulation.c
index 4f568cb9af3f90b62c52de1af32170ee4650d29d..0848ca90255dd26d1a2802db2b9dd5ba6308a9bc 100644 (file)
@@ -7,8 +7,8 @@
  *   Intel Corporation, Microsoft Corporation. Advanced Power Management
  *   (APM) BIOS Interface Specification, Revision 1.2, February 1996.
  *
- * [This document is available from Microsoft at:
- *    http://www.microsoft.com/hwdev/busbios/amp_12.htm]
+ * This document is available from Microsoft at:
+ *    http://www.microsoft.com/whdc/archive/amp_12.mspx
  */
 #include <linux/module.h>
 #include <linux/poll.h>
@@ -265,8 +265,8 @@ static unsigned int apm_poll(struct file *fp, poll_table * wait)
  *   Only when everyone who has opened /dev/apm_bios with write permission
  *   has acknowledge does the actual suspend happen.
  */
-static int
-apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
+static long
+apm_ioctl(struct file *filp, u_int cmd, u_long arg)
 {
        struct apm_user *as = filp->private_data;
        int err = -EINVAL;
@@ -274,6 +274,7 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
        if (!as->suser || !as->writer)
                return -EPERM;
 
+       lock_kernel();
        switch (cmd) {
        case APM_IOC_SUSPEND:
                mutex_lock(&state_lock);
@@ -334,6 +335,7 @@ apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
                mutex_unlock(&state_lock);
                break;
        }
+       unlock_kernel();
 
        return err;
 }
@@ -397,7 +399,7 @@ static const struct file_operations apm_bios_fops = {
        .owner          = THIS_MODULE,
        .read           = apm_read,
        .poll           = apm_poll,
-       .ioctl          = apm_ioctl,
+       .unlocked_ioctl = apm_ioctl,
        .open           = apm_open,
        .release        = apm_release,
 };
This page took 0.028523 seconds and 5 git commands to generate.