diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2021-02-03 21:56:39 +0000 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-02-04 10:21:26 +0100 |
commit | 18227424549cfc1b3f7c88ec04be2c6a8ac3b887 (patch) | |
tree | e961566dff322bc8817ddc7d8960d471a1592007 /drivers/platform | |
parent | 7553390d4b7e636d9be7913b16f4b9ae8b75df4c (diff) |
platform/x86: ideapad-laptop: change 'cfg' debugfs file format
Minor formatting changes. Use seq_puts() where possible.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20210203215403.290792-23-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/ideapad-laptop.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index c26941cb8f9d..a89588f3dc51 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -321,37 +321,40 @@ static int debugfs_cfg_show(struct seq_file *s, void *data) { struct ideapad_private *priv = s->private; - seq_printf(s, "cfg: 0x%.8lX\n\nCapability: ", - priv->cfg); + seq_printf(s, "_CFG: %#010lx\n\n", priv->cfg); + + seq_puts(s, "Capabilities:"); if (test_bit(CFG_CAP_BT_BIT, &priv->cfg)) - seq_printf(s, "Bluetooth "); + seq_puts(s, " bluetooth"); if (test_bit(CFG_CAP_3G_BIT, &priv->cfg)) - seq_printf(s, "3G "); + seq_puts(s, " 3G"); if (test_bit(CFG_CAP_WIFI_BIT, &priv->cfg)) - seq_printf(s, "Wireless "); + seq_puts(s, " wifi"); if (test_bit(CFG_CAP_CAM_BIT, &priv->cfg)) - seq_printf(s, "Camera "); + seq_puts(s, " camera"); if (test_bit(CFG_CAP_TOUCHPAD_BIT, &priv->cfg)) - seq_printf(s, "Touchpad "); - seq_printf(s, "\nGraphic: "); - switch ((priv->cfg)&0x700) { + seq_puts(s, " touchpad"); + seq_puts(s, "\n"); + + seq_puts(s, "Graphics: "); + switch (priv->cfg & 0x700) { case 0x100: - seq_printf(s, "Intel"); + seq_puts(s, "Intel"); break; case 0x200: - seq_printf(s, "ATI"); + seq_puts(s, "ATI"); break; case 0x300: - seq_printf(s, "Nvidia"); + seq_puts(s, "Nvidia"); break; case 0x400: - seq_printf(s, "Intel and ATI"); + seq_puts(s, "Intel and ATI"); break; case 0x500: - seq_printf(s, "Intel and Nvidia"); + seq_puts(s, "Intel and Nvidia"); break; } - seq_printf(s, "\n"); + seq_puts(s, "\n"); return 0; } |