-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;
-}
-