Unverified Commit 2ccbdb61 authored by Benjamin Philip's avatar Benjamin Philip Committed by Ilpo Järvinen
Browse files

platform/x86: ideadpad-laptop: Clean up style warnings and checks



This commit makes some style changes to clean up the following
checkpatch warnings and checks at various places in ideapad.c:

- WARNING: quoted string split across lines
- WARNING: space prohibited between function name and open parenthesis '('
- WARNING: braces {} are not necessary for any arm of this statement
- CHECK: Alignment should match open parenthesis

We exceed the 80 column limit to fix the quoted string warning since
strings in question are user visible. See coding style, part 2 for
details.

Signed-off-by: default avatarBenjamin Philip <benjamin.philip495@gmail.com>
Acked-by: default avatarIke Panhc <ikepanhc@gmail.com>
Link: https://patch.msgid.link/20260106184830.34426-1-benjamin.philip495@gmail.com


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 118222e2
Loading
Loading
Loading
Loading
+16 −23
Original line number Diff line number Diff line
@@ -219,38 +219,32 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for bluetooth.");
static bool allow_v4_dytc;
module_param(allow_v4_dytc, bool, 0444);
MODULE_PARM_DESC(allow_v4_dytc,
	"Enable DYTC version 4 platform-profile support. "
	"If you need this please report this to: platform-driver-x86@vger.kernel.org");
		 "Enable DYTC version 4 platform-profile support. If you need this please report this to: platform-driver-x86@vger.kernel.org");

static bool hw_rfkill_switch;
module_param(hw_rfkill_switch, bool, 0444);
MODULE_PARM_DESC(hw_rfkill_switch,
	"Enable rfkill support for laptops with a hw on/off wifi switch/slider. "
	"If you need this please report this to: platform-driver-x86@vger.kernel.org");
		 "Enable rfkill support for laptops with a hw on/off wifi switch/slider. If you need this please report this to: platform-driver-x86@vger.kernel.org");

static bool set_fn_lock_led;
module_param(set_fn_lock_led, bool, 0444);
MODULE_PARM_DESC(set_fn_lock_led,
	"Enable driver based updates of the fn-lock LED on fn-lock changes. "
	"If you need this please report this to: platform-driver-x86@vger.kernel.org");
		 "Enable driver based updates of the fn-lock LED on fn-lock changes. If you need this please report this to: platform-driver-x86@vger.kernel.org");

static bool ctrl_ps2_aux_port;
module_param(ctrl_ps2_aux_port, bool, 0444);
MODULE_PARM_DESC(ctrl_ps2_aux_port,
	"Enable driver based PS/2 aux port en-/dis-abling on touchpad on/off toggle. "
	"If you need this please report this to: platform-driver-x86@vger.kernel.org");
		 "Enable driver based PS/2 aux port en-/dis-abling on touchpad on/off toggle. If you need this please report this to: platform-driver-x86@vger.kernel.org");

static bool touchpad_ctrl_via_ec;
module_param(touchpad_ctrl_via_ec, bool, 0444);
MODULE_PARM_DESC(touchpad_ctrl_via_ec,
	"Enable registering a 'touchpad' sysfs-attribute which can be used to manually "
	"tell the EC to enable/disable the touchpad. This may not work on all models.");
		 "Enable registering a 'touchpad' sysfs-attribute which can be used to manually tell the EC to enable/disable the touchpad. This may not work on all models.");

static bool ymc_ec_trigger __read_mostly;
module_param(ymc_ec_trigger, bool, 0444);
MODULE_PARM_DESC(ymc_ec_trigger,
	"Enable EC triggering work-around to force emitting tablet mode events. "
	"If you need this please report this to: platform-driver-x86@vger.kernel.org");
		 "Enable EC triggering work-around to force emitting tablet mode events. If you need this please report this to: platform-driver-x86@vger.kernel.org");

/*
 * shared data
@@ -1706,11 +1700,10 @@ static int ideapad_kbd_bl_init(struct ideapad_private *priv)
	if (WARN_ON(priv->kbd_bl.initialized))
		return -EEXIST;

	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type)) {
	if (ideapad_kbd_bl_check_tristate(priv->kbd_bl.type))
		priv->kbd_bl.led.max_brightness = 2;
	} else {
	else
		priv->kbd_bl.led.max_brightness = 1;
	}

	brightness = ideapad_kbd_bl_brightness_get(priv);
	if (brightness < 0)