Commit 4379cad1 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files
parents 46374d3f 5c7895c0
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -29,13 +29,13 @@

/*  descriptor block used for chained dma transfers */
struct plx_dma_desc {
	volatile uint32_t pci_start_addr;
	volatile uint32_t local_start_addr;
	__le32 pci_start_addr;
	__le32 local_start_addr;
	/* transfer_size is in bytes, only first 23 bits of register are used */
	volatile uint32_t transfer_size;
	__le32 transfer_size;
	/* address of next descriptor (quad word aligned), plus some
	 * additional bits (see PLX_DMA0_DESCRIPTOR_REG) */
	volatile uint32_t next;
	__le32 next;
};

/**********************************************************************
+2 −1
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@
#define BRCM_SHIFT(c, r, f)   c##_##r##_##f##_SHIFT

#define GET_FIELD(m, c, r, f) \
	((((m) & BRCM_MASK(c, r, f)) >> BRCM_SHIFT(c, r, f)) << BRCM_ALIGN(c, r, f))
	((((m) & BRCM_MASK(c, r, f)) >> BRCM_SHIFT(c, r, f)) << \
	 BRCM_ALIGN(c, r, f))

#define SET_FIELD(m, c, r, f, d) \
	((m) = (((m) & ~BRCM_MASK(c, r, f)) | ((((d) >> BRCM_ALIGN(c, r, f)) << \
+7 −11
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
#include <linux/interrupt.h>	/* For tasklet and interrupt structs/defines */
#include <linux/serial_reg.h>
#include <linux/termios.h>
#include <asm/uaccess.h>	/* For copy_from_user/copy_to_user */
#include <linux/uaccess.h>	/* For copy_from_user/copy_to_user */

#include "dgnc_driver.h"
#include "dgnc_pci.h"
@@ -77,8 +77,7 @@ int dgnc_mgmt_open(struct inode *inode, struct file *file)
			return -EBUSY;
		}
		dgnc_mgmt_in_use[minor]++;
	}
	else {
	} else {
		DGNC_UNLOCK(dgnc_global_lock, lock_flags);
		return -ENXIO;
	}
@@ -107,10 +106,9 @@ int dgnc_mgmt_close(struct inode *inode, struct file *file)

	/* mgmt device */
	if (minor < MAXMGMTDEVICES) {
		if (dgnc_mgmt_in_use[minor]) {
		if (dgnc_mgmt_in_use[minor])
			dgnc_mgmt_in_use[minor] = 0;
	}
	}
	DGNC_UNLOCK(dgnc_global_lock, lock_flags);

	DPR_MGMT(("dgnc_mgmt_close finish.\n"));
@@ -165,9 +163,8 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

		struct digi_info di;

		if (copy_from_user(&brd, uarg, sizeof(int))) {
		if (copy_from_user(&brd, uarg, sizeof(int)))
			return -EFAULT;
		}

		DPR_MGMT(("DIGI_GETBD asking about board: %d\n", brd));

@@ -209,9 +206,8 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		uint board = 0;
		uint channel = 0;

		if (copy_from_user(&ni, uarg, sizeof(ni))) {
		if (copy_from_user(&ni, uarg, sizeof(ni)))
			return -EFAULT;
		}

		DPR_MGMT(("DIGI_GETBD asking about board: %d channel: %d\n",
			ni.board, ni.channel));
+3 −1
Original line number Diff line number Diff line
@@ -65,7 +65,9 @@ static ssize_t dgrp_class_pollrate_store(struct device *c,
					 struct device_attribute *attr,
					 const char *buf, size_t count)
{
	sscanf(buf, "0x%x\n", &dgrp_poll_tick);
	if (sscanf(buf, "0x%x\n", &dgrp_poll_tick) != 1)
		return -EINVAL;

	return count;
}
static DEVICE_ATTR(pollrate, 0600, dgrp_class_pollrate_show,
+1 −0
Original line number Diff line number Diff line
@@ -2798,6 +2798,7 @@ static int dgrp_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
		}

		/* pretend we didn't recognize this */
		/* fall-through */

	case DIGI_SETA:
		return dgrp_tty_digiseta(tty, (struct digi_struct *) arg);
Loading