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

Commit bc259adc authored by Linus Torvalds's avatar Linus Torvalds
Browse files


Pull staging tree fixes from Greg Kroah-Hartman:
 "Here are a number of small fixes for the drivers/staging tree, as well
  as iio and pstore drivers (which came from the staging tree in the
  3.5-rc1 merge).  All of these are tiny, but resolve issues that people
  have been reporting.

  There's also a documentation update to reflect what the iio drivers
  really are doing, which is good to get straightened out.

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

* tag 'staging-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: r8712u: Add new USB IDs
  staging: gdm72xx: Release netlink socket properly
  iio: drop wrong reference from Kconfig
  pstore/inode: Make pstore_fill_super() static
  pstore/ram: Should zap persistent zone on unlink
  pstore/ram_core: Factor persistent_ram_zap() out of post_init()
  pstore/ram_core: Do not reset restored zone's position and size
  pstore/ram: Should update old dmesg buffer before reading
  staging:iio:ad7298: Fix linker error due to missing IIO kfifo buffer
  Revert "staging: usbip: bugfix for stack corruption on 64-bit architectures"
  staging: usbip: bugfix for stack corruption on 64-bit architectures
  staging/comedi: fix build for USB not enabled
  staging: omapdrm: fix crash when freeing bad fb
  staging:iio:ad7606: Re-add missing scale attribute
  iio: Fix potential use after free
  staging:iio: remove num_interrupt_lines from documentation
  iio: documentation: Add out_altvoltage and friends
parents fe803524 3026b0e9
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -219,6 +219,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_voltage_scale
What:		/sys/bus/iio/devices/iio:deviceX/out_voltageY_scale
What:		/sys/bus/iio/devices/iio:deviceX/out_altvoltageY_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_accel_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_accel_peak_scale
What:		/sys/bus/iio/devices/iio:deviceX/in_anglvel_scale
@@ -273,6 +274,7 @@ What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale_available
What:		/sys/.../iio:deviceX/in_voltageX_scale_available
What:		/sys/.../iio:deviceX/in_voltage-voltage_scale_available
What:		/sys/.../iio:deviceX/out_voltageX_scale_available
What:		/sys/.../iio:deviceX/out_altvoltageX_scale_available
What:		/sys/.../iio:deviceX/in_capacitance_scale_available
KernelVersion:	2.635
Contact:	linux-iio@vger.kernel.org
@@ -298,14 +300,19 @@ Description:
		gives the 3dB frequency of the filter in Hz.

What:		/sys/bus/iio/devices/iio:deviceX/out_voltageY_raw
What:		/sys/bus/iio/devices/iio:deviceX/out_altvoltageY_raw
KernelVersion:	2.6.37
Contact:	linux-iio@vger.kernel.org
Description:
		Raw (unscaled, no bias etc.) output voltage for
		channel Y.  The number must always be specified and
		unique if the output corresponds to a single channel.
		While DAC like devices typically use out_voltage,
		a continuous frequency generating device, such as
		a DDS or PLL should use out_altvoltage.

What:		/sys/bus/iio/devices/iio:deviceX/out_voltageY&Z_raw
What:		/sys/bus/iio/devices/iio:deviceX/out_altvoltageY&Z_raw
KernelVersion:	2.6.37
Contact:	linux-iio@vger.kernel.org
Description:
@@ -316,6 +323,8 @@ Description:

What:		/sys/bus/iio/devices/iio:deviceX/out_voltageY_powerdown_mode
What:		/sys/bus/iio/devices/iio:deviceX/out_voltage_powerdown_mode
What:		/sys/bus/iio/devices/iio:deviceX/out_altvoltageY_powerdown_mode
What:		/sys/bus/iio/devices/iio:deviceX/out_altvoltage_powerdown_mode
KernelVersion:	2.6.38
Contact:	linux-iio@vger.kernel.org
Description:
@@ -330,6 +339,8 @@ Description:

What:		/sys/.../iio:deviceX/out_votlageY_powerdown_mode_available
What:		/sys/.../iio:deviceX/out_voltage_powerdown_mode_available
What:		/sys/.../iio:deviceX/out_altvotlageY_powerdown_mode_available
What:		/sys/.../iio:deviceX/out_altvoltage_powerdown_mode_available
KernelVersion:	2.6.38
Contact:	linux-iio@vger.kernel.org
Description:
@@ -338,6 +349,8 @@ Description:

What:		/sys/bus/iio/devices/iio:deviceX/out_voltageY_powerdown
What:		/sys/bus/iio/devices/iio:deviceX/out_voltage_powerdown
What:		/sys/bus/iio/devices/iio:deviceX/out_altvoltageY_powerdown
What:		/sys/bus/iio/devices/iio:deviceX/out_altvoltage_powerdown
KernelVersion:	2.6.38
Contact:	linux-iio@vger.kernel.org
Description:
@@ -346,6 +359,24 @@ Description:
		normal operation. Y may be suppressed if all outputs are
		controlled together.

What:		/sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency
KernelVersion:	3.4.0
Contact:	linux-iio@vger.kernel.org
Description:
		Output frequency for channel Y in Hz. The number must always be
		specified and unique if the output corresponds to a single
		channel.

What:		/sys/bus/iio/devices/iio:deviceX/out_altvoltageY_phase
KernelVersion:	3.4.0
Contact:	linux-iio@vger.kernel.org
Description:
		Phase in radians of one frequency/clock output Y
		(out_altvoltageY) relative to another frequency/clock output
		(out_altvoltageZ) of the device X. The number must always be
		specified and unique if the output corresponds to a single
		channel.

What:		/sys/bus/iio/devices/iio:deviceX/events
KernelVersion:	2.6.35
Contact:	linux-iio@vger.kernel.org
+1 −2
Original line number Diff line number Diff line
@@ -8,8 +8,7 @@ menuconfig IIO
	help
	  The industrial I/O subsystem provides a unified framework for
	  drivers for many different types of embedded sensors using a
	  number of different physical interfaces (i2c, spi, etc). See
	  Documentation/iio for more information.
	  number of different physical interfaces (i2c, spi, etc).

if IIO

+9 −7
Original line number Diff line number Diff line
@@ -661,7 +661,6 @@ static int iio_device_register_sysfs(struct iio_dev *indio_dev)
	 * New channel registration method - relies on the fact a group does
	 * not need to be initialized if it is name is NULL.
	 */
	INIT_LIST_HEAD(&indio_dev->channel_attr_list);
	if (indio_dev->channels)
		for (i = 0; i < indio_dev->num_channels; i++) {
			ret = iio_device_add_channel_sysfs(indio_dev,
@@ -725,12 +724,16 @@ static void iio_device_unregister_sysfs(struct iio_dev *indio_dev)
static void iio_dev_release(struct device *device)
{
	struct iio_dev *indio_dev = dev_to_iio_dev(device);
	if (indio_dev->chrdev.dev)
		cdev_del(&indio_dev->chrdev);
	if (indio_dev->modes & INDIO_BUFFER_TRIGGERED)
		iio_device_unregister_trigger_consumer(indio_dev);
	iio_device_unregister_eventset(indio_dev);
	iio_device_unregister_sysfs(indio_dev);
	iio_device_unregister_debugfs(indio_dev);

	ida_simple_remove(&iio_ida, indio_dev->id);
	kfree(indio_dev);
}

static struct device_type iio_dev_type = {
@@ -761,6 +764,7 @@ struct iio_dev *iio_device_alloc(int sizeof_priv)
		dev_set_drvdata(&dev->dev, (void *)dev);
		mutex_init(&dev->mlock);
		mutex_init(&dev->info_exist_lock);
		INIT_LIST_HEAD(&dev->channel_attr_list);

		dev->id = ida_simple_get(&iio_ida, 0, 0, GFP_KERNEL);
		if (dev->id < 0) {
@@ -778,10 +782,8 @@ EXPORT_SYMBOL(iio_device_alloc);

void iio_device_free(struct iio_dev *dev)
{
	if (dev) {
		ida_simple_remove(&iio_ida, dev->id);
		kfree(dev);
	}
	if (dev)
		put_device(&dev->dev);
}
EXPORT_SYMBOL(iio_device_free);

@@ -902,7 +904,7 @@ void iio_device_unregister(struct iio_dev *indio_dev)
	mutex_lock(&indio_dev->info_exist_lock);
	indio_dev->info = NULL;
	mutex_unlock(&indio_dev->info_exist_lock);
	device_unregister(&indio_dev->dev);
	device_del(&indio_dev->dev);
}
EXPORT_SYMBOL(iio_device_unregister);
subsys_initcall(iio_init);
+5 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/pci.h>
#include <linux/usb.h>
#include <linux/errno.h>
#include <linux/kconfig.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/fcntl.h>
@@ -981,6 +982,8 @@ void comedi_pci_driver_unregister(struct comedi_driver *comedi_driver,
}
EXPORT_SYMBOL_GPL(comedi_pci_driver_unregister);

#if IS_ENABLED(CONFIG_USB)

static int comedi_old_usb_auto_config(struct usb_interface *intf,
				      struct comedi_driver *driver)
{
@@ -1043,3 +1046,5 @@ void comedi_usb_driver_unregister(struct comedi_driver *comedi_driver,
	comedi_driver_unregister(comedi_driver);
}
EXPORT_SYMBOL_GPL(comedi_usb_driver_unregister);

#endif
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ struct sock *netlink_init(int unit, void (*cb)(struct net_device *dev, u16 type,

void netlink_exit(struct sock *sock)
{
	sock_release(sock->sk_socket);
	netlink_kernel_release(sock);
}

int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
Loading