Commit c059d579 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Greg Kroah-Hartman

parport: daisy: avoid hardcoded name

The daisy device name is hardcoded, define it in the header file and
use it in the code.
Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20191016144540.18810-1-sudipm.mukherjee@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 45a2d646
...@@ -257,7 +257,7 @@ static ssize_t parport_read_device_id (struct parport *port, char *buffer, ...@@ -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 parport_device_id (int devnum, char *buffer, size_t count)
{ {
ssize_t retval = -ENXIO; ssize_t retval = -ENXIO;
struct pardevice *dev = parport_open (devnum, "Device ID probe"); struct pardevice *dev = parport_open(devnum, daisy_dev_name);
if (!dev) if (!dev)
return -ENXIO; return -ENXIO;
......
...@@ -460,6 +460,7 @@ extern size_t parport_ieee1284_epp_read_addr (struct parport *, ...@@ -460,6 +460,7 @@ extern size_t parport_ieee1284_epp_read_addr (struct parport *,
void *, size_t, int); void *, size_t, int);
/* IEEE1284.3 functions */ /* IEEE1284.3 functions */
#define daisy_dev_name "Device ID probe"
extern int parport_daisy_init (struct parport *port); extern int parport_daisy_init (struct parport *port);
extern void parport_daisy_fini (struct parport *port); extern void parport_daisy_fini (struct parport *port);
extern struct pardevice *parport_open (int devnum, const char *name); extern struct pardevice *parport_open (int devnum, const char *name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment