aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorJan van den Berg <janvdberg@gmail.com>2014-09-16 18:01:08 -0400
committerDarren Hart <dvhart@linux.intel.com>2014-09-17 16:55:53 -0400
commit72a979f09fa9111fd6be8326e5f21319ff6918fb (patch)
treec256c096993f66e370ac15d548d499619d89efdc /drivers/platform
parent93f8c16d635e6b1e3ea978e38e110391ce28b26f (diff)
x86: thinkpad_acpi.c: fixed spacing coding style issue
Fixed 22 similar coding style issues: "ERROR: spaces required around that '?'" Signed-off-by: Jan van den Berg <janvdberg@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 3bbc6eb60de5..f959978c7aac 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3440,7 +3440,7 @@ err_exit:
3440 delete_attr_set(hotkey_dev_attributes, &tpacpi_pdev->dev.kobj); 3440 delete_attr_set(hotkey_dev_attributes, &tpacpi_pdev->dev.kobj);
3441 hotkey_dev_attributes = NULL; 3441 hotkey_dev_attributes = NULL;
3442 3442
3443 return (res < 0)? res : 1; 3443 return (res < 0) ? res : 1;
3444} 3444}
3445 3445
3446/* Thinkpad X1 Carbon support 5 modes including Home mode, Web browser 3446/* Thinkpad X1 Carbon support 5 modes including Home mode, Web browser
@@ -4576,7 +4576,7 @@ static int __init video_init(struct ibm_init_struct *iibm)
4576 str_supported(video_supported != TPACPI_VIDEO_NONE), 4576 str_supported(video_supported != TPACPI_VIDEO_NONE),
4577 video_supported); 4577 video_supported);
4578 4578
4579 return (video_supported != TPACPI_VIDEO_NONE)? 0 : 1; 4579 return (video_supported != TPACPI_VIDEO_NONE) ? 0 : 1;
4580} 4580}
4581 4581
4582static void video_exit(void) 4582static void video_exit(void)
@@ -4669,7 +4669,7 @@ static int video_outputsw_set(int status)
4669 return -ENOSYS; 4669 return -ENOSYS;
4670 } 4670 }
4671 4671
4672 return (res)? 0 : -EIO; 4672 return (res) ? 0 : -EIO;
4673} 4673}
4674 4674
4675static int video_autosw_get(void) 4675static int video_autosw_get(void)
@@ -4695,7 +4695,7 @@ static int video_autosw_get(void)
4695 4695
4696static int video_autosw_set(int enable) 4696static int video_autosw_set(int enable)
4697{ 4697{
4698 if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", (enable)? 1 : 0)) 4698 if (!acpi_evalf(vid_handle, NULL, "_DOS", "vd", (enable) ? 1 : 0))
4699 return -EIO; 4699 return -EIO;
4700 return 0; 4700 return 0;
4701} 4701}
@@ -4730,20 +4730,20 @@ static int video_outputsw_cycle(void)
4730 return -EIO; 4730 return -EIO;
4731 } 4731 }
4732 4732
4733 return (res)? 0 : -EIO; 4733 return (res) ? 0 : -EIO;
4734} 4734}
4735 4735
4736static int video_expand_toggle(void) 4736static int video_expand_toggle(void)
4737{ 4737{
4738 switch (video_supported) { 4738 switch (video_supported) {
4739 case TPACPI_VIDEO_570: 4739 case TPACPI_VIDEO_570:
4740 return acpi_evalf(ec_handle, NULL, "_Q17", "v")? 4740 return acpi_evalf(ec_handle, NULL, "_Q17", "v") ?
4741 0 : -EIO; 4741 0 : -EIO;
4742 case TPACPI_VIDEO_770: 4742 case TPACPI_VIDEO_770:
4743 return acpi_evalf(vid_handle, NULL, "VEXP", "v")? 4743 return acpi_evalf(vid_handle, NULL, "VEXP", "v") ?
4744 0 : -EIO; 4744 0 : -EIO;
4745 case TPACPI_VIDEO_NEW: 4745 case TPACPI_VIDEO_NEW:
4746 return acpi_evalf(NULL, NULL, "\\VEXP", "v")? 4746 return acpi_evalf(NULL, NULL, "\\VEXP", "v") ?
4747 0 : -EIO; 4747 0 : -EIO;
4748 default: 4748 default:
4749 return -ENOSYS; 4749 return -ENOSYS;
@@ -4887,14 +4887,14 @@ static int light_set_status(int status)
4887 if (tp_features.light) { 4887 if (tp_features.light) {
4888 if (cmos_handle) { 4888 if (cmos_handle) {
4889 rc = acpi_evalf(cmos_handle, NULL, NULL, "vd", 4889 rc = acpi_evalf(cmos_handle, NULL, NULL, "vd",
4890 (status)? 4890 (status) ?
4891 TP_CMOS_THINKLIGHT_ON : 4891 TP_CMOS_THINKLIGHT_ON :
4892 TP_CMOS_THINKLIGHT_OFF); 4892 TP_CMOS_THINKLIGHT_OFF);
4893 } else { 4893 } else {
4894 rc = acpi_evalf(lght_handle, NULL, NULL, "vd", 4894 rc = acpi_evalf(lght_handle, NULL, NULL, "vd",
4895 (status)? 1 : 0); 4895 (status) ? 1 : 0);
4896 } 4896 }
4897 return (rc)? 0 : -EIO; 4897 return (rc) ? 0 : -EIO;
4898 } 4898 }
4899 4899
4900 return -ENXIO; 4900 return -ENXIO;
@@ -4923,7 +4923,7 @@ static void light_sysfs_set(struct led_classdev *led_cdev,
4923 4923
4924static enum led_brightness light_sysfs_get(struct led_classdev *led_cdev) 4924static enum led_brightness light_sysfs_get(struct led_classdev *led_cdev)
4925{ 4925{
4926 return (light_get_status() == 1)? LED_FULL : LED_OFF; 4926 return (light_get_status() == 1) ? LED_FULL : LED_OFF;
4927} 4927}
4928 4928
4929static struct tpacpi_led_classdev tpacpi_led_thinklight = { 4929static struct tpacpi_led_classdev tpacpi_led_thinklight = {
@@ -5045,7 +5045,7 @@ static ssize_t cmos_command_store(struct device *dev,
5045 return -EINVAL; 5045 return -EINVAL;
5046 5046
5047 res = issue_thinkpad_cmos_command(cmos_cmd); 5047 res = issue_thinkpad_cmos_command(cmos_cmd);
5048 return (res)? res : count; 5048 return (res) ? res : count;
5049} 5049}
5050 5050
5051static struct device_attribute dev_attr_cmos_command = 5051static struct device_attribute dev_attr_cmos_command =
@@ -5069,7 +5069,7 @@ static int __init cmos_init(struct ibm_init_struct *iibm)
5069 if (res) 5069 if (res)
5070 return res; 5070 return res;
5071 5071
5072 return (cmos_handle)? 0 : 1; 5072 return (cmos_handle) ? 0 : 1;
5073} 5073}
5074 5074
5075static void cmos_exit(void) 5075static void cmos_exit(void)
@@ -5179,9 +5179,9 @@ static int led_get_status(const unsigned int led)
5179 if (!acpi_evalf(ec_handle, 5179 if (!acpi_evalf(ec_handle,
5180 &status, "GLED", "dd", 1 << led)) 5180 &status, "GLED", "dd", 1 << led))
5181 return -EIO; 5181 return -EIO;
5182 led_s = (status == 0)? 5182 led_s = (status == 0) ?
5183 TPACPI_LED_OFF : 5183 TPACPI_LED_OFF :
5184 ((status == 1)? 5184 ((status == 1) ?
5185 TPACPI_LED_ON : 5185 TPACPI_LED_ON :
5186 TPACPI_LED_BLINK); 5186 TPACPI_LED_BLINK);
5187 tpacpi_led_state_cache[led] = led_s; 5187 tpacpi_led_state_cache[led] = led_s;
@@ -5578,7 +5578,7 @@ static int __init beep_init(struct ibm_init_struct *iibm)
5578 5578
5579 tp_features.beep_needs_two_args = !!(quirks & TPACPI_BEEP_Q1); 5579 tp_features.beep_needs_two_args = !!(quirks & TPACPI_BEEP_Q1);
5580 5580
5581 return (beep_handle)? 0 : 1; 5581 return (beep_handle) ? 0 : 1;
5582} 5582}
5583 5583
5584static int beep_read(struct seq_file *m) 5584static int beep_read(struct seq_file *m)
@@ -6527,7 +6527,7 @@ static int brightness_write(char *buf)
6527 if (!rc && ibm_backlight_device) 6527 if (!rc && ibm_backlight_device)
6528 backlight_force_update(ibm_backlight_device, 6528 backlight_force_update(ibm_backlight_device,
6529 BACKLIGHT_UPDATE_SYSFS); 6529 BACKLIGHT_UPDATE_SYSFS);
6530 return (rc == -EINTR)? -ERESTARTSYS : rc; 6530 return (rc == -EINTR) ? -ERESTARTSYS : rc;
6531} 6531}
6532 6532
6533static struct ibm_struct brightness_driver_data = { 6533static struct ibm_struct brightness_driver_data = {
@@ -7984,7 +7984,7 @@ static ssize_t fan_pwm1_store(struct device *dev,
7984 } 7984 }
7985 7985
7986 mutex_unlock(&fan_mutex); 7986 mutex_unlock(&fan_mutex);
7987 return (rc)? rc : count; 7987 return (rc) ? rc : count;
7988} 7988}
7989 7989
7990static struct device_attribute dev_attr_fan_pwm1 = 7990static struct device_attribute dev_attr_fan_pwm1 =
@@ -8662,7 +8662,7 @@ static const char * __init str_supported(int is_supported)
8662{ 8662{
8663 static char text_unsupported[] __initdata = "not supported"; 8663 static char text_unsupported[] __initdata = "not supported";
8664 8664
8665 return (is_supported)? &text_unsupported[4] : &text_unsupported[0]; 8665 return (is_supported) ? &text_unsupported[4] : &text_unsupported[0];
8666} 8666}
8667#endif /* CONFIG_THINKPAD_ACPI_DEBUG */ 8667#endif /* CONFIG_THINKPAD_ACPI_DEBUG */
8668 8668
@@ -8783,7 +8783,7 @@ err_out:
8783 ibm->name, ret); 8783 ibm->name, ret);
8784 8784
8785 ibm_exit(ibm); 8785 ibm_exit(ibm);
8786 return (ret < 0)? ret : 0; 8786 return (ret < 0) ? ret : 0;
8787} 8787}
8788 8788
8789/* Probing */ 8789/* Probing */
@@ -8794,7 +8794,7 @@ static bool __pure __init tpacpi_is_fw_digit(const char c)
8794} 8794}
8795 8795
8796/* Most models: xxyTkkWW (#.##c); Ancient 570/600 and -SL lacks (#.##c) */ 8796/* Most models: xxyTkkWW (#.##c); Ancient 570/600 and -SL lacks (#.##c) */
8797static bool __pure __init tpacpi_is_valid_fw_id(const char* const s, 8797static bool __pure __init tpacpi_is_valid_fw_id(const char * const s,
8798 const char t) 8798 const char t)
8799{ 8799{
8800 return s && strlen(s) >= 8 && 8800 return s && strlen(s) >= 8 &&