Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen...
[cascardo/linux.git] / drivers / misc / sony-laptop.c
index 9c2e80b..9623eaf 100644 (file)
@@ -63,7 +63,7 @@
 #include <asm/uaccess.h>
 #include <linux/sonypi.h>
 #include <linux/sony-laptop.h>
-#ifdef CONFIG_SONY_LAPTOP_OLD
+#ifdef CONFIG_SONYPI_COMPAT
 #include <linux/poll.h>
 #include <linux/miscdevice.h>
 #endif
@@ -114,7 +114,7 @@ MODULE_PARM_DESC(camera,
                 "set this to 1 to enable Motion Eye camera controls "
                 "(only use it if you have a C1VE or C1VN model)");
 
-#ifdef CONFIG_SONY_LAPTOP_OLD
+#ifdef CONFIG_SONYPI_COMPAT
 static int minor = -1;
 module_param(minor, int, 0);
 MODULE_PARM_DESC(minor,
@@ -1317,40 +1317,6 @@ static int __sony_pic_camera_on(void)
        return 0;
 }
 
-static ssize_t sony_pic_camerapower_store(struct device *dev,
-               struct device_attribute *attr,
-               const char *buffer, size_t count)
-{
-       unsigned long value;
-       int result;
-       if (count > 31)
-               return -EINVAL;
-
-       value = simple_strtoul(buffer, NULL, 10);
-
-       mutex_lock(&spic_dev.lock);
-       if (value)
-               result = __sony_pic_camera_on();
-       else
-               result = __sony_pic_camera_off();
-       mutex_unlock(&spic_dev.lock);
-
-       if (result)
-               return result;
-
-       return count;
-}
-
-static ssize_t sony_pic_camerapower_show(struct device *dev,
-               struct device_attribute *attr, char *buffer)
-{
-       ssize_t count;
-       mutex_lock(&spic_dev.lock);
-       count = snprintf(buffer, PAGE_SIZE, "%d\n", spic_dev.camera_power);
-       mutex_unlock(&spic_dev.lock);
-       return count;
-}
-
 /* External camera command (exported to the motion eye v4l driver) */
 int sony_pic_camera_command(int command, u8 value)
 {
@@ -1522,13 +1488,11 @@ struct device_attribute spic_attr_##_name = __ATTR(_name,       \
                _mode, sony_pic_## _name ##_show,               \
                sony_pic_## _name ##_store)
 
-static SPIC_ATTR(camerapower, 0644);
 static SPIC_ATTR(bluetoothpower, 0644);
 static SPIC_ATTR(wwanpower, 0644);
 static SPIC_ATTR(fanspeed, 0644);
 
 static struct attribute *spic_attributes[] = {
-       &spic_attr_camerapower.attr,
        &spic_attr_bluetoothpower.attr,
        &spic_attr_wwanpower.attr,
        &spic_attr_fanspeed.attr,
@@ -1540,7 +1504,7 @@ static struct attribute_group spic_attribute_group = {
 };
 
 /******** SONYPI compatibility **********/
-#ifdef CONFIG_SONY_LAPTOP_OLD
+#ifdef CONFIG_SONYPI_COMPAT
 
 /* battery / brightness / temperature  addresses */
 #define SONYPI_BAT_FLAGS       0x81
@@ -1834,7 +1798,7 @@ static void sonypi_compat_exit(void)
 static int sonypi_compat_init(void) { return 0; }
 static void sonypi_compat_exit(void) { }
 static void sonypi_compat_report_event(u8 event) { }
-#endif /* CONFIG_SONY_LAPTOP_OLD */
+#endif /* CONFIG_SONYPI_COMPAT */
 
 /*
  * ACPI callbacks
@@ -1953,7 +1917,8 @@ end:
  */
 static int sony_pic_disable(struct acpi_device *device)
 {
-       if (ACPI_FAILURE(acpi_evaluate_object(device->handle, "_DIS", 0, NULL)))
+       if (ACPI_FAILURE(acpi_evaluate_object(device->handle,
+                       "_DIS", NULL, NULL)))
                return -ENXIO;
 
        dprintk("Device disabled\n");