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

Commit 557e2e2e authored by Linus Torvalds's avatar Linus Torvalds
Browse files


Pull staging fixes from Greg Kroah-Hartman:
 "Here are some staging driver fixes (and iio driver fixes, they get
  lumped in with the staging stuff due to dependancies) for your 3.6-rc3
  tree.

  Nothing major, just a bunch of fixes that people have reported.

  Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">

* tag 'staging-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (26 commits)
  iio: lm3533-als: Fix build warnings
  staging:iio:ad7780: Mark channels as unsigned
  staging:iio:ad7192: Report offset and scale for temperature channel
  staging:iio:ad7192: Report channel offset
  staging:iio:ad7192: Mark channels as unsigned
  staging:iio:ad7192: Fix setting ACX
  staging:iio:ad7192: Add missing break in switch statement
  staging:iio:ad7793: Fix internal reference value
  staging:iio:ad7793: Follow new IIO naming spec
  staging:iio:ad7793: Fix temperature scale and offset
  staging:iio:ad7793: Report channel offset
  staging:iio:ad7793: Mark channels as unsigned
  staging:iio:ad7793: Add missing break in switch statement
  iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()
  iio: frequency: ADF4350: Fix potential reference div factor overflow.
  iio: staging: ad7298_ring: Fix maybe-uninitialized warning
  staging: comedi: usbduxfast: Declare MODULE_FIRMWARE usage
  staging: comedi: usbdux: Declare MODULE_FIRMWARE usage
  staging: comedi: usbduxsigma: Declare MODULE_FIRMWARE usage
  staging: csr: add INET dependancy
  ...
parents c8391797 3a491aea
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
{
	struct adf4350_platform_data *pdata = st->pdata;
	u64 tmp;
	u32 div_gcd, prescaler;
	u32 div_gcd, prescaler, chspc;
	u16 mdiv, r_cnt = 0;
	u8 band_sel_div;

@@ -158,14 +158,20 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
	if (pdata->ref_div_factor)
		r_cnt = pdata->ref_div_factor - 1;

	do  {
		r_cnt = adf4350_tune_r_cnt(st, r_cnt);
	chspc = st->chspc;

		st->r1_mod = st->fpfd / st->chspc;
		while (st->r1_mod > ADF4350_MAX_MODULUS) {
	do  {
		do {
			do {
				r_cnt = adf4350_tune_r_cnt(st, r_cnt);
			st->r1_mod = st->fpfd / st->chspc;
				st->r1_mod = st->fpfd / chspc;
				if (r_cnt > ADF4350_MAX_R_CNT) {
					/* try higher spacing values */
					chspc++;
					r_cnt = 0;
				}
			} while ((st->r1_mod > ADF4350_MAX_MODULUS) && r_cnt);
		} while (r_cnt == 0);

		tmp = freq * (u64)st->r1_mod + (st->fpfd > 1);
		do_div(tmp, st->fpfd); /* Div round closest (n + d/2)/d */
@@ -194,7 +200,7 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
	st->regs[ADF4350_REG0] = ADF4350_REG0_INT(st->r0_int) |
				 ADF4350_REG0_FRACT(st->r0_fract);

	st->regs[ADF4350_REG1] = ADF4350_REG1_PHASE(0) |
	st->regs[ADF4350_REG1] = ADF4350_REG1_PHASE(1) |
				 ADF4350_REG1_MOD(st->r1_mod) |
				 prescaler;

+4 −3
Original line number Diff line number Diff line
@@ -271,9 +271,10 @@ static int adjd_s311_update_scan_mode(struct iio_dev *indio_dev,
	const unsigned long *scan_mask)
{
	struct adjd_s311_data *data = iio_priv(indio_dev);
	data->buffer = krealloc(data->buffer, indio_dev->scan_bytes,
				GFP_KERNEL);
	if (!data->buffer)

	kfree(data->buffer);
	data->buffer = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
	if (data->buffer == NULL)
		return -ENOMEM;

	return 0;
+2 −2
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ static int lm3533_als_get_hysteresis(struct iio_dev *indio_dev, unsigned nr,
	return ret;
}

static int show_thresh_either_en(struct device *dev,
static ssize_t show_thresh_either_en(struct device *dev,
					struct device_attribute *attr,
					char *buf)
{
@@ -424,7 +424,7 @@ static int show_thresh_either_en(struct device *dev,
	return scnprintf(buf, PAGE_SIZE, "%u\n", enable);
}

static int store_thresh_either_en(struct device *dev,
static ssize_t store_thresh_either_en(struct device *dev,
					struct device_attribute *attr,
					const char *buf, size_t len)
{
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
			dev->board_ptr = comedi_recognize(driv, it->board_name);
			if (dev->board_ptr)
				break;
		} else if (strcmp(driv->driver_name, it->board_name))
		} else if (strcmp(driv->driver_name, it->board_name) == 0)
			break;
		module_put(driv->module);
	}
+0 −3
Original line number Diff line number Diff line
@@ -1349,9 +1349,6 @@ static struct pci_dev *pci1710_find_pci_dev(struct comedi_device *dev,
		}
		if (pcidev->vendor != PCI_VENDOR_ID_ADVANTECH)
			continue;
		if (pci_is_enabled(pcidev))
			continue;

		if (strcmp(this_board->name, DRV_NAME) == 0) {
			for (i = 0; i < ARRAY_SIZE(boardtypes); ++i) {
				if (pcidev->device == boardtypes[i].device_id) {
Loading