Skip to content

Commit e6a4fcf

Browse files
committed
ALSA: hda: Simplify with str_enable_disable()
Use the standard helper str_enable_disable() to simplify the code. Only code refactoring, no behavior change. Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent a0f70af commit e6a4fcf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sound/hda/hdac_component.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <linux/module.h>
66
#include <linux/pci.h>
77
#include <linux/component.h>
8+
#include <linux/string_choices.h>
89
#include <sound/core.h>
910
#include <sound/hdaudio.h>
1011
#include <sound/hda_component.h>
@@ -42,8 +43,7 @@ int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable)
4243
if (!acomp->ops->codec_wake_override)
4344
return 0;
4445

45-
dev_dbg(bus->dev, "%s codec wakeup\n",
46-
enable ? "enable" : "disable");
46+
dev_dbg(bus->dev, "%s codec wakeup\n", str_enable_disable(enable));
4747

4848
acomp->ops->codec_wake_override(acomp->dev, enable);
4949

@@ -67,8 +67,7 @@ void snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
6767
{
6868
struct drm_audio_component *acomp = bus->audio_component;
6969

70-
dev_dbg(bus->dev, "display power %s\n",
71-
enable ? "enable" : "disable");
70+
dev_dbg(bus->dev, "display power %s\n", str_enable_disable(enable));
7271

7372
mutex_lock(&bus->lock);
7473
if (enable)

0 commit comments

Comments
 (0)