Skip to content

Commit

Permalink
parport: daisy: avoid hardcoded name
Browse files Browse the repository at this point in the history
The daisy device name is hardcoded, define it in the header file and
use it in the code.

Signed-off-by: Sudip Mukherjee <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
sudipm-mukherjee authored and gregkh committed Nov 13, 2019
1 parent 45a2d64 commit c059d57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/parport/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions include/linux/parport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c059d57

Please sign in to comment.