aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sony-laptop.c
diff options
context:
space:
mode:
authormalattia@linux.it <malattia@linux.it>2007-04-28 10:36:40 -0400
committerLen Brown <len.brown@intel.com>2007-04-28 22:06:03 -0400
commit1b20d34406775369d50fc2ffe27a64a0d6fd313e (patch)
tree8736581667b8c2c83b4c8a65471ecfdccee1fe3d /drivers/misc/sony-laptop.c
parentcbefb762b67fa6d3eb2a48ae3380358a940e8c9d (diff)
sony-laptop: remove user visible camera controls as platform attributes
Avoid giving the user the possibility to shoot his own foot and let the meye driver enable/disable the camera wisely (PCI_ID based). Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/misc/sony-laptop.c')
-rw-r--r--drivers/misc/sony-laptop.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 9c2e80b38241..c15c1f61bd1b 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -1317,40 +1317,6 @@ static int __sony_pic_camera_on(void)
1317 return 0; 1317 return 0;
1318} 1318}
1319 1319
1320static ssize_t sony_pic_camerapower_store(struct device *dev,
1321 struct device_attribute *attr,
1322 const char *buffer, size_t count)
1323{
1324 unsigned long value;
1325 int result;
1326 if (count > 31)
1327 return -EINVAL;
1328
1329 value = simple_strtoul(buffer, NULL, 10);
1330
1331 mutex_lock(&spic_dev.lock);
1332 if (value)
1333 result = __sony_pic_camera_on();
1334 else
1335 result = __sony_pic_camera_off();
1336 mutex_unlock(&spic_dev.lock);
1337
1338 if (result)
1339 return result;
1340
1341 return count;
1342}
1343
1344static ssize_t sony_pic_camerapower_show(struct device *dev,
1345 struct device_attribute *attr, char *buffer)
1346{
1347 ssize_t count;
1348 mutex_lock(&spic_dev.lock);
1349 count = snprintf(buffer, PAGE_SIZE, "%d\n", spic_dev.camera_power);
1350 mutex_unlock(&spic_dev.lock);
1351 return count;
1352}
1353
1354/* External camera command (exported to the motion eye v4l driver) */ 1320/* External camera command (exported to the motion eye v4l driver) */
1355int sony_pic_camera_command(int command, u8 value) 1321int sony_pic_camera_command(int command, u8 value)
1356{ 1322{
@@ -1522,13 +1488,11 @@ struct device_attribute spic_attr_##_name = __ATTR(_name, \
1522 _mode, sony_pic_## _name ##_show, \ 1488 _mode, sony_pic_## _name ##_show, \
1523 sony_pic_## _name ##_store) 1489 sony_pic_## _name ##_store)
1524 1490
1525static SPIC_ATTR(camerapower, 0644);
1526static SPIC_ATTR(bluetoothpower, 0644); 1491static SPIC_ATTR(bluetoothpower, 0644);
1527static SPIC_ATTR(wwanpower, 0644); 1492static SPIC_ATTR(wwanpower, 0644);
1528static SPIC_ATTR(fanspeed, 0644); 1493static SPIC_ATTR(fanspeed, 0644);
1529 1494
1530static struct attribute *spic_attributes[] = { 1495static struct attribute *spic_attributes[] = {
1531 &spic_attr_camerapower.attr,
1532 &spic_attr_bluetoothpower.attr, 1496 &spic_attr_bluetoothpower.attr,
1533 &spic_attr_wwanpower.attr, 1497 &spic_attr_wwanpower.attr,
1534 &spic_attr_fanspeed.attr, 1498 &spic_attr_fanspeed.attr,