This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sachin Kamat [Fri, 17 Aug 2012 11:09:36 +0000 (16:39 +0530)]
Staging: android: binder: Make task_get_unused_fd_flags function static
Silence the following warning:
drivers/staging/android/binder.c:368:5: warning:
symbol 'task_get_unused_fd_flags' was not declared. Should it be static?
When `--with-tcp-wrappers` is passed to `configure`, the previous code
always reset LIBS to $saved_LIBS, regardless of whether libwrap was
found or not. The current code makes the `--with-tcp-wrappers` case
look more like the default case, and it only resets LIBS if libwrap
was not found.
Signed-off-by: W. Trevor King <wking@tremily.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ke_counter: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcimdda: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function.
This driver does use an external configuration option to determine
the analog output range which is controlled by a jumper on the board.
In order to remove the legacy 'attach' callback, an assumption is made
that the jumper is in the factory setting position for +/-5V outputs.
This does not effect the operation of the board just the range info
that is returned to the user.
A sysfs method will be investigated to allow the user to change the
range.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcimdda: cleanup the analog out read/write
Use the register map define to work out the i/o address.
Cleanup the comments about the simultaneous transfer mode for
the analog outputs.
Change the return to 'insn->n', the comedi core expects the return
to be the number of data elements used. Technically the 'i' value
is correct but 'insn->n' just makes it clearer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcimdda: fix bug in call to subdev_8255_cleanup
The attach function only allocated 2 subdevices, an analog output
sundevice (index 0) and the 8255 dio subdevice (index 1). The
detach function is passing the wrong subdevice (index 2) to the
subdev_8255_cleanup function which will result in a bug when
it tries to do the kfree(s->private).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcimdda: remove attached_to_8255 from private data
The attached_to_8255 variable in the private data is used as a flag
to indicate that the 8255 subdevice has been initialized. The call
to subdev_8255_cleanup only requires that the dev->subdevices pointer
is valid. Change the test in the detach function and remove the
attached_to_8255 variable.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcimdda: remove regs_badrindex and reg_sz from boardinfo
The base address of the card is always found in pci resource 3. There is
no need to carry this information in the boardinfo. The reg_sz is not
used in the driver. Remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcimdda: remove dio_chans from the private data
The cards supported by this driver always have 8255 compatible
device. Remove the dio_chans variable from the private data and
always initialize the 8255 subdevice.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcimdda: remove the DIO_METHODS
The digital i/o on this card is handled by an 8255 compatible
device. There are not other options. Remove the DIO_METHODS
enum as well as the dio_method variable in the boardinfo and
the code dealing with it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcimdda: cleanup the 8255 subdevice init
The dio_registers variable in the private data is only used to
pass the base address to the 8255 subdevice. Remove the variable
from the private data and pass the value directly to the
subdev_8255_init() function.
Make sure to check the return from subdev_8255_init(). That
function can fail. For aesthetic reasons, rename the local
variable 'err' to 'ret'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcimdas: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcidda: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcidio: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: cb_pcidas: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: adl_pci8164: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Commit 8cb05f4b54535cb91d7a5f9f8eb230bd4fa86e4e (staging:
tidspbridge: eliminate uuid_uuid_to_string), not only broke
compilation but also functionality for tidspbridge driver.
So:
- Replace remaining instances of uuid_uuid_to_string with snprintf
to fix compilation.
- Fix the format from %pU to %pUL.
- Since these UUIDs are used in the firmware to reference section
names, the firmware doesn't follow the standard uuid delimiter '-'
it uses '_' instead. The driver can follow the standard convention
however for dsp sections we must transform the uuid to what is
expected by the firmware. E.g.:
Marek Vasut [Sun, 12 Aug 2012 15:21:00 +0000 (16:21 +0100)]
IIO: Add 4-byte unsigned reads into generic-buffer example
Add unsigned 32bit-wide reads into the generic-buffer.c
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Juergen Beisert <jbe@pengutronix.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Wolfgang Denk <wd@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Julia Lawall [Tue, 31 Jul 2012 13:09:00 +0000 (14:09 +0100)]
drivers/iio/adc/at91_adc.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches. This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.
The call to platform_get_resource(pdev, IORESOURCE_MEM, 0) is moved coser
to the call to devm_request_and_ioremap, which is th first use of the
result of platform_get_resource.
This does not use devm_request_irq to ensure that free_irq is executed
before its idev argument is freed.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Devendra Naga [Thu, 16 Aug 2012 16:20:03 +0000 (21:50 +0530)]
staging:csr: remove usage of CsrSnprintf and use scnprintf
This change tries to achieve the removal of the csr driver defined snprintf
and uses the kernel defined snprintf.
After this change i got following build warnings, which are solved in this patch
warnings generated:
drivers/staging/csr/io.c:929:13: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’
drivers/staging/csr/io.c:929:13: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘u32’
drivers/staging/csr/csr_wifi_hip_udi.c: In function ‘unifi_print_status’:
drivers/staging/csr/csr_wifi_hip_udi.c:78:27: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’
drivers/staging/csr/csr_wifi_hip_udi.c:151:27: warning: format ‘%u’ expects type ‘unsigned int’, but argument 5 has type ‘long int’
drivers/staging/csr/csr_wifi_hip_udi.c:257:27: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’
drivers/staging/csr/csr_wifi_hip_udi.c:257:27: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘u32’
drivers/staging/csr/csr_wifi_hip_udi.c:261:27: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’
Ian Abbott [Thu, 16 Aug 2012 13:38:05 +0000 (14:38 +0100)]
staging: comedi: replace printk calls in comedi core
Replace the printk() calls in the comedi core module with something more
suitable, such as dev_...() or pr_...(). Remove the ones that report a
failure to increment a module count (try_module_get() failure). Change
the printk() call in the DPRINTK() macro to pr_debug().
TODO: Most of the DPRINTK() calls need to be replaced with something
else.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The IS_ENABLED(CONFIG_COMEDI_AMPLC_PC236_ISA) and
IS_ENABLED(CONFIG_COMEDI_AMPLC_PC236_PCI) macro calls are a bit
long-winded. Define a couple of macros DO_ISA and DO_PCI as
abbreviations for them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 16 Aug 2012 11:24:10 +0000 (12:24 +0100)]
staging: comedi: amplc_pc236: check bus type before accessing LCR
The PCI-local bridge LCR registers are (assumed to be) present and used
iff the board is a PCI board (a PCI236). Currently the code tests if
devpriv->lcr_iobase is valid before accessing the registers. Instead,
check if the board is a PCI board and assume devpriv->lcr_iobase is
valid if so. (Currently, no validity check is performed as the PCI
vendor and device ID ought to suffice, but simple checks could be added
when attaching the device.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 16 Aug 2012 11:24:09 +0000 (12:24 +0100)]
staging: comedi: amplc_pc236: check bus type in detach routine
When detaching the device in pc236_detach() mirror the bus type checks
performed by pc236_attach(). The existing tests are safe but rely on
dev->iobase being 0 when comedi_to_pci_dev(dev) is NULL.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 16 Aug 2012 11:24:08 +0000 (12:24 +0100)]
staging: comedi: amplc_pc236: add helper functions to check bus type
Add inline helper function is_isa_board(board) to check if the driver
supports ISA boards and this is an ISA board, and is_pci_board(board) to
check if the driver supports PCI boards and this is a PCI board.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The IS_ENABLED(CONFIG_COMEDI_AMPLC_PC263_ISA) and
IS_ENABLED(CONFIG_COMEDI_AMPLC_PC263_PCI) macro calls are a bit
long-winded. Define a couple of macros DO_ISA and DO_PCI as
abbreviations for them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 16 Aug 2012 10:14:19 +0000 (11:14 +0100)]
staging: comedi: amplc_pc263: check bus type in detach routine
When detaching the device in pc263_detach() mirror the bus type checks
performed by pc263_attach(). The existing tests are safe but rely on
dev->iobase being 0 when comedi_to_pci_dev(dev) is NULL.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 16 Aug 2012 10:14:18 +0000 (11:14 +0100)]
staging: comedi: amplc_pc263: add helper functions to check bus type
Add inline helper function is_isa_board(board) to check if the driver
supports ISA boards and this is an ISA board, and is_pci_board(board) to
check if the driver supports PCI boards and this is a PCI board.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: contec_pci_dio: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an attach_pci callback function. Since the
driver does not require any external configuration options, disable
the legacy attach by making the attach simply return -ENOSYS. This
removes the need to walk to pci bus to find the pci_dev and the
need for the pci_dev_put in the detach.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: contec_pci_dio: define register map for board
Only one board type is supported by this driver. Instead of
passing the register offsets for the digital in/out ports in
the boardinfo, define the register map and use that to access
the ports.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Devendra Naga [Wed, 15 Aug 2012 09:11:03 +0000 (14:56 +0545)]
staging: serqt_usb2: remove retval initialisation in qt_tiocmget and qt_tiocmset
in qt_tiocmset,
the retval gets assigned if we have a valid serial pointer in the critical section
(between mutex_lock and _unlock) of the code, no need to initialise this variable.
the same retval assignment follows in the qt_tiocmget function also, so remove the
initialisation here too.
Ian Abbott [Wed, 15 Aug 2012 14:31:41 +0000 (15:31 +0100)]
staging: comedi: amplc_dio200: replace macros with inline functions
Replace the IS_ISA_BOARD() and IS_PCI_BOARD() functionlike macros with
inline functions is_isa_board() and is_pci_board(). Also call
is_pci_board() in dio200_find_pci_board() instead of an explicit
comparison operator.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Wed, 15 Aug 2012 14:02:45 +0000 (15:02 +0100)]
staging: comedi: make attach handler optional
Some low-level Comedi drivers no longer support manual configuration of
devices with the COMEDI_DEVCONFIG ioctl (used by the comedi_config
program). For those drivers, the 'attach_pci' or 'attach_usb' handler
will be set in the struct comedi_driver to configure devices
automatically (via comedi_pci_auto_config() or
comedi_usb_auto_config()). Their 'attach' handlers are redundant but
the the comedi core module currently requires it to be set.
Make the 'attach' handler optional and issue a warning if something
wants to call it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dnya_pci10xx: move boardinfo values into subdevice setup
There is only one "boardtype" actually supported by this driver.
The second entry in the boardinfo is a dummy entry that would
result in an unusable device.
Remove the boardinfo fields and just use the open coded values
in the subdevice setup.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dnya_pci10xx: cleanup the analog output range
The analog output channels on this board only support a single
range, 0-10V unipolar. This range is available as an exported
symbol from the comedi core and "range_unipolar10". Use that
instead of duplicating the range in this driver and remove
the information from the boardinfo.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dnya_pci10xx: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an attach_pci callback function. Since the
driver does not require any external configuration options, disable
the legacy attach by making the attach simply return -ENOSYS. This
removes the need to walk the pci bus to find the pci_dev and the
need for the pci_dev_put() in the detach.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dnya_pci10xx: remove thisboard and devpriv macros
These macros rely on local variables having a specific name. Replace
them with local variables where used. Use the comedi_board() helper
to get the thisboard pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andre Renaud [Wed, 15 Aug 2012 20:18:02 +0000 (15:18 -0500)]
staging: omapdrm: Expose the OMAP Z-Order property through DRM
Added support for zorder changes through DRM plane properties
Signed-off-by: Andre Renaud <andre@bluewatersys.com> Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This driver uses the void *private variable in the comedi_subdevice
to pass the offset needed to read/write the appropriate register to
get/set the channels for the subdevice.
The adl_pci7x3x_do_insn_bits() and adl_pci7x3x_di_insn_bits() functions
were retrieving this offset by casting the s->private value as an
unsigned int. On 64-bit builds this results in a warning:
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
Fix these warnings by casting the void * to an unsigned long.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 14 Aug 2012 15:31:28 +0000 (16:31 +0100)]
staging: comedi: amplc_dio200: add helper macros to check bus type
Add helper macro IS_ISA_BOARD(board) to check if the driver supports ISA
boards and this is an ISA board, and IS_PCI_BOARD(board) to check if the
driver supports PCI boards and this is a PCI board.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Tue, 14 Aug 2012 15:31:29 +0000 (16:31 +0100)]
staging: comedi: amplc_dio200: check bus type in detach routine
When detaching the device in dio200_detach() mirror the bus type checks
performed by dio200_attach(). The existing tests are safe but rely on
dev->iobase being 0 when comedi_to_pci_dev(dev) is NULL.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The IS_ENABLED(CONFIG_COMEDI_AMPLC_DIO200_ISA) and
IS_ENABLED(CONFIG_COMEDI_AMPLC_DIO200_PCI) macro calls are a bit
long-winded. Define a couple of macros DO_ISA and DO_PCI as
abbreviations for them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Aug 2012 07:04:45 +0000 (10:04 +0300)]
Staging: xgifb: fix bitwise vs logical bug
This is a static checker fix and not something I can test. The intent
of the code here is to set some bit flags. For a logical OR the ">> 1"
shift wouldn't make a difference. So it should be using a bitwise OR.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
the code which under _init and _exit does only the platform_driver_register
and platform_driver_unregister, and nothing else,
so its better to use the module_platform_driver macro rather duplicating
its implementation
Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The per driver iio_chan_spec arrays are usually shared between multiple device
instances. So a single device instance may not modify the iio_chan_spec array
since this would also affect the other device instances. To make this restriction
explicit mark the per driver iio_chan_spec arrays as const.
Conversion was done automatically using the following coccinelle semantic patch:
Jesper Juhl [Tue, 7 Aug 2012 19:44:54 +0000 (21:44 +0200)]
staging: speakup: i18n.c: Fix leak in msg_set()
If we end up returning -EINVAL from the function we will leak the
memory allocated to 'newstr' which has been allocated but not yet
assigned to anything.
Fix the leak by properly freeing the memory again before we return.
This patchset provides page mapping via the page table.
On some archs, most notably ARM, this method has been
demonstrated to be faster than copying.
The logic controlling the method selection (copy vs page table)
is controlled by the definition of USE_PGTABLE_MAPPING which
is/can be defined for any arch that performs better with page
table mapping.