linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] parport: daisy: avoid hardcoded name
@ 2019-10-16 14:45 Sudip Mukherjee
  2019-10-16 14:45 ` [PATCH 2/4] parport: do not check portlist when using device-model Sudip Mukherjee
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sudip Mukherjee @ 2019-10-16 14:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Michal Kubecek, Steven Rostedt, Sudip Mukherjee

The daisy device name is hardcoded, define it in the header file and
use it in the code.

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 drivers/parport/probe.c | 2 +-
 include/linux/parport.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/parport/probe.c b/drivers/parport/probe.c
index e035174ba205..4e2bfeb6b4a6 100644
--- a/drivers/parport/probe.c
+++ b/drivers/parport/probe.c
@@ -257,7 +257,7 @@ static ssize_t parport_read_device_id (struct parport *port, char *buffer,
 ssize_t parport_device_id (int devnum, char *buffer, size_t count)
 {
 	ssize_t retval = -ENXIO;
-	struct pardevice *dev = parport_open (devnum, "Device ID probe");
+	struct pardevice *dev = parport_open(devnum, daisy_dev_name);
 	if (!dev)
 		return -ENXIO;
 
diff --git a/include/linux/parport.h b/include/linux/parport.h
index 397607a0c0eb..13932ce8b37b 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -460,6 +460,7 @@ extern size_t parport_ieee1284_epp_read_addr (struct parport *,
 					      void *, size_t, int);
 
 /* IEEE1284.3 functions */
+#define daisy_dev_name "Device ID probe"
 extern int parport_daisy_init (struct parport *port);
 extern void parport_daisy_fini (struct parport *port);
 extern struct pardevice *parport_open (int devnum, const char *name);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-11 15:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 14:45 [PATCH 1/4] parport: daisy: avoid hardcoded name Sudip Mukherjee
2019-10-16 14:45 ` [PATCH 2/4] parport: do not check portlist when using device-model Sudip Mukherjee
2019-10-16 14:45 ` [PATCH 3/4] parport: load lowlevel driver if ports not found Sudip Mukherjee
2019-10-16 14:45 ` [PATCH 4/4] parport: daisy: use new parport device model Sudip Mukherjee
2019-10-18  1:10   ` Steven Rostedt
2019-11-11 15:43     ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).