* [PATCH v1] media: dvb-frontends: ascot2e: Use str_read_write() helper
@ 2025-06-17 11:04 wangyufei
0 siblings, 0 replies; only message in thread
From: wangyufei @ 2025-06-17 11:04 UTC (permalink / raw)
To: Abylay Ospan, Mauro Carvalho Chehab, linux-media, linux-kernel
Cc: opensource.kernel, wangyufei
Remove hard-coded strings by using the str_read_write() helper.
Signed-off-by: wangyufei <wangyufei@vivo.com>
---
drivers/media/dvb-frontends/ascot2e.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/ascot2e.c b/drivers/media/dvb-frontends/ascot2e.c
index cf8e5f1bd..4254f5867 100644
--- a/drivers/media/dvb-frontends/ascot2e.c
+++ b/drivers/media/dvb-frontends/ascot2e.c
@@ -16,6 +16,7 @@
#include <linux/types.h>
#include "ascot2e.h"
#include <media/dvb_frontend.h>
+#include <linux/string_choices.h>
#define MAX_WRITE_REGSIZE 10
@@ -104,7 +105,7 @@ static void ascot2e_i2c_debug(struct ascot2e_priv *priv,
u8 reg, u8 write, const u8 *data, u32 len)
{
dev_dbg(&priv->i2c->dev, "ascot2e: I2C %s reg 0x%02x size %d\n",
- (write == 0 ? "read" : "write"), reg, len);
+ str_read_write(write == 0), reg, len);
print_hex_dump_bytes("ascot2e: I2C data: ",
DUMP_PREFIX_OFFSET, data, len);
}
--
2.39.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-17 11:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-17 11:04 [PATCH v1] media: dvb-frontends: ascot2e: Use str_read_write() helper wangyufei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®