Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b02957d5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Staging: Merge two branches of coding style fixes together



Turns out that multiple people sent pretty much the same patch
for the same staging drivers.  Commit these in two different
branches and merge them together to get a more complete coverage
of the cleanup and properly credit everyone for the work that they
did.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parents 3a8954e8 b94c765a
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -63,7 +63,7 @@ module_param(comedi_debug, int, 0644);
int comedi_autoconfig = 1;
int comedi_autoconfig = 1;
module_param(comedi_autoconfig, bool, 0444);
module_param(comedi_autoconfig, bool, 0444);


int comedi_num_legacy_minors = 0;
int comedi_num_legacy_minors;
module_param(comedi_num_legacy_minors, int, 0444);
module_param(comedi_num_legacy_minors, int, 0444);


static DEFINE_SPINLOCK(comedi_file_info_table_lock);
static DEFINE_SPINLOCK(comedi_file_info_table_lock);
+7 −9
Original line number Original line Diff line number Diff line
@@ -54,7 +54,6 @@ enum ni_660x_constants {
#define NUM_PFI_CHANNELS 40
#define NUM_PFI_CHANNELS 40
/* really there are only up to 3 dma channels, but the register layout allows
/* really there are only up to 3 dma channels, but the register layout allows
for 4 */
for 4 */

#define MAX_DMA_CHANNEL 4
#define MAX_DMA_CHANNEL 4


/* See Register-Level Programmer Manual page 3.1 */
/* See Register-Level Programmer Manual page 3.1 */
@@ -1082,8 +1081,7 @@ static int ni_660x_attach(struct comedi_device *dev,
	output enables in stc dio control reg */
	output enables in stc dio control reg */
	ni_660x_write_register(dev, 0, 0, STCDIOControl);
	ni_660x_write_register(dev, 0, 0, STCDIOControl);


	private(dev)->counter_dev
	private(dev)->counter_dev = ni_gpct_device_construct(dev,
		= ni_gpct_device_construct(dev,
						     &ni_gpct_write_register,
						     &ni_gpct_write_register,
						     &ni_gpct_read_register,
						     &ni_gpct_read_register,
						     ni_gpct_variant_660x,
						     ni_gpct_variant_660x,
+10 −3
Original line number Original line Diff line number Diff line
@@ -628,9 +628,11 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
	/* analog output */
	/* analog output */
	s = dev->subdevices + 1;
	s = dev->subdevices + 1;
	if (thisboard->has_ao) {
	if (thisboard->has_ao) {
		/* Could provide command support, except it only has a
		/*
		 * Could provide command support, except it only has a
		 * one sample hardware buffer for analog output and no
		 * one sample hardware buffer for analog output and no
		 * underrun flag. */
		 * underrun flag.
		 */
		s->type = COMEDI_SUBD_AO;
		s->type = COMEDI_SUBD_AO;
		s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND;
		s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND;
		s->n_chan = NUM_AO_CHAN;
		s->n_chan = NUM_AO_CHAN;
@@ -1149,6 +1151,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
	/*  initialize software conversion count */
	/*  initialize software conversion count */
	if (cmd->stop_src == TRIG_COUNT)
	if (cmd->stop_src == TRIG_COUNT)
		devpriv->count = cmd->stop_arg * cmd->chanlist_len;
		devpriv->count = cmd->stop_arg * cmd->chanlist_len;

	/*  setup hardware conversion counter */
	/*  setup hardware conversion counter */
	if (cmd->stop_src == TRIG_EXT) {
	if (cmd->stop_src == TRIG_EXT) {
		/*  load counter a1 with count of 3 (pc+ manual says this is minimum allowed) using mode 0 */
		/*  load counter a1 with count of 3 (pc+ manual says this is minimum allowed) using mode 0 */
@@ -1403,7 +1406,10 @@ static irqreturn_t labpc_interrupt(int irq, void *d)
	}
	}


	if (devpriv->current_transfer == isa_dma_transfer) {
	if (devpriv->current_transfer == isa_dma_transfer) {
	/* if a dma terminal count of external stop trigger has occurred */
		/*
		 * if a dma terminal count of external stop trigger
		 * has occurred
		 */
		if (devpriv->status1_bits & DMATC_BIT ||
		if (devpriv->status1_bits & DMATC_BIT ||
		    (thisboard->register_layout == labpc_1200_layout
		    (thisboard->register_layout == labpc_1200_layout
		     && devpriv->status2_bits & A1_TC_BIT)) {
		     && devpriv->status2_bits & A1_TC_BIT)) {
@@ -1523,6 +1529,7 @@ static void labpc_drain_dma(struct comedi_device *dev)
	/* write data to comedi buffer */
	/* write data to comedi buffer */
	for (i = 0; i < num_points; i++)
	for (i = 0; i < num_points; i++)
		cfc_write_to_buffer(s, devpriv->dma_buffer[i]);
		cfc_write_to_buffer(s, devpriv->dma_buffer[i]);

	if (async->cmd.stop_src == TRIG_COUNT)
	if (async->cmd.stop_src == TRIG_COUNT)
		devpriv->count -= num_points;
		devpriv->count -= num_points;


+7 −6
Original line number Original line Diff line number Diff line
@@ -134,7 +134,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
	unsigned long iobase;
	unsigned long iobase;


	iobase = it->options[0];
	iobase = it->options[0];
	printk(KERN_NOTICE "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase);
	printk(KERN_INFO "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase);
	if (!request_region(iobase, PCMAD_SIZE, "pcmad")) {
	if (!request_region(iobase, PCMAD_SIZE, "pcmad")) {
		printk(KERN_CONT "I/O port conflict\n");
		printk(KERN_CONT "I/O port conflict\n");
		return -EIO;
		return -EIO;
@@ -166,10 +166,11 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)


static int pcmad_detach(struct comedi_device *dev)
static int pcmad_detach(struct comedi_device *dev)
{
{
	printk(KERN_NOTICE "comedi%d: pcmad: remove\n", dev->minor);
	printk(KERN_INFO "comedi%d: pcmad: remove\n", dev->minor);


	if (dev->irq)
	if (dev->irq)
		free_irq(dev->irq, dev);
		free_irq(dev->irq, dev);

	if (dev->iobase)
	if (dev->iobase)
		release_region(dev->iobase, PCMAD_SIZE);
		release_region(dev->iobase, PCMAD_SIZE);


+3 −3
Original line number Original line Diff line number Diff line
@@ -128,15 +128,15 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
	dev->board_name = this_board->name;
	dev->board_name = this_board->name;


	if (iobase == 0) {
	if (iobase == 0) {
		printk(KERN_WARNING "io base address required\n");
		printk(KERN_ERR "io base address required\n");
		return -EINVAL;
		return -EINVAL;
	}
	}


	iosize = this_board->iosize;
	iosize = this_board->iosize;
	/* check if io addresses are available */
	/* check if io addresses are available */
	if (!request_region(iobase, iosize, "dac02")) {
	if (!request_region(iobase, iosize, "dac02")) {
		printk(KERN_WARNING "I/O port conflict: failed to allocate "
		printk(KERN_ERR "I/O port conflict: failed to allocate ports "
		       "ports 0x%lx to 0x%lx\n", iobase, iobase + iosize - 1);
			"0x%lx to 0x%lx\n", iobase, iobase + iosize - 1);
		return -EIO;
		return -EIO;
	}
	}
	dev->iobase = iobase;
	dev->iobase = iobase;
Loading