]> err.no Git - linux-2.6/blobdiff - drivers/char/efirtc.c
ide: add ->read_status method
[linux-2.6] / drivers / char / efirtc.c
index 0090e7a4fcd34bd67cd04c73869072fce59bf7e7..d57ca3e4e5343311f43acbf8b35021ed16ee3fe4 100644 (file)
@@ -18,7 +18,7 @@
  *
  * NOTES:
  *     - Locking is required for safe execution of EFI calls with regards
- *       to interrrupts and SMP.
+ *       to interrupts and SMP.
  *
  * TODO (December 1999):
  *     - provide the API to set/get the WakeUp Alarm (different from the
@@ -28,6 +28,7 @@
  */
 
 
+#include <linux/smp_lock.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/miscdevice.h>
@@ -272,6 +273,7 @@ efi_rtc_open(struct inode *inode, struct file *file)
         * We do accept multiple open files at the same time as we
         * synchronize on the per call operation.
         */
+       cycle_kernel_lock();
        return 0;
 }
 
@@ -285,7 +287,7 @@ efi_rtc_close(struct inode *inode, struct file *file)
  *     The various file operations we support.
  */
 
-static struct file_operations efi_rtc_fops = {
+static const struct file_operations efi_rtc_fops = {
        .owner          = THIS_MODULE,
        .ioctl          = efi_rtc_ioctl,
        .open           = efi_rtc_open,