Skip to content

Commit

Permalink
Staging: comedi: Make comedi_auto_config() succeed when auto-configur…
Browse files Browse the repository at this point in the history
…ation disabled.

Otherwise it would not work properly.

From: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent 6742c0a commit 719548e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,10 @@ int comedi_auto_config(struct device *hardware_device, const char *board_name, c
int retval;
unsigned *private_data = NULL;

if (!comedi_autoconfig)
return -ENODEV;
if (!comedi_autoconfig) {
dev_set_drvdata(hardware_device, NULL);
return 0;
}

minor = comedi_alloc_board_minor(hardware_device);
if(minor < 0) return minor;
Expand Down

0 comments on commit 719548e

Please sign in to comment.