staging: omap-thermal: improve conf data handling and initialization
While registering the thermal zone, it is required to have the cooling
devices already setup, so that the .bind callback can succeed.
Due to that, the driver code needs to be reorganized so that we first
setup the cooling devices then the zones. This way we cope with the
right thermal framework initialization sequence.
This patch changes the order of the thermal zone initialization,
so that we create it only when the cooling devices are available.
It also adds some defensive checks for the config data, so that
the callbacks are ready for calls when the data is still not
initialized.
staging: comedi: adl_pci9111: remove extra i8253_cascade_ns_to_timer_2div()
The comedi core always calls the 'do_cmdtest' function before it
calls the 'do_cmd' function. The 'do_cmdtest' for this driver calls
i8253_cascade_ns_to_timer_2div() to validate the cmd->convert_arg.
This call sets the dev_private 'div1' and 'div2' values needed to
program the 8254 timer. There is no need to call the i8253 function
a second time in the do_cmd function.
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>
All of the comedi drivers that support the 'cmd' callback also
require a 'do_cmdtest' callback. The do_cmdtest validates the
comedi_cmd before it is executed.
"Step 1" of each do_cmdtest does a trivial validation of the
trigger sources by doing something like this for each trigger:
int err = 0;
unsigned int tmp;
tmp = cmd->start_src;
src &= TRIG_NOW;
if (!src || tmp != src)
err++;
/* Test the remaining triggers similarly */
if (err)
return 1;
Introduce a helper function in comedi_fc to handle this boilerplate.
The drivers can then just do:
err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW);
/* Test the remaining triggers similarly */
if (err)
return 1;
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>
Macpaul Lin [Tue, 11 Sep 2012 07:55:31 +0000 (15:55 +0800)]
staging/gdm72xx: remove camel-case vars in gdm_qos
Remove camel-case variables in gdm_qos.h and gdm_qos.c
Signed-off-by: Macpaul Lin <macpaul@gmail.com> Cc: Paul Stewart <pstew@chromium.org> Cc: Ben Chan <benchan@chromium.org> Cc: Sage Ahn <syahn@gctsemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The 'is_valid' variable in the private data is only used in the
detach of the board to determine if the pci9111_reset() function
can be called. That function only requires a valid dev->iobase
to work. Use that for the check instead and remove the unneeded
variable from the private data.
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_pci9111: cleanup the io register map
Finish renaming the defines for the register map. Move the bit
defines so that they are associated with the register. Remove
the unneeded '0' bit defines.
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_pci9111: use local variables for the chan/range
Simplify the chan/range in pci9111_ai_insn_read() by using local
variables for hold the values and by just passing insn->chanspec
to the CR_* macros instead of using (&insn->chanspec)[0].
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_pci9111: 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. The
boardinfo is also not needed now so remove it also.
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_pci9111: analog input subdevice is fixed
The analog input subdevice is the same for all boards supported by
this driver. Remove the boardinfo just open-code the values in the
attach function.
Note: the only other board that could be supported by this driver is
the ADLink PCI-9111DG board. This board has 12-bit analog inputs
instead of the 16-bit inputs of the PCI-9111HR board. Unfortunately
these boards share the same PCI vendor/device id.
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_pci9111: digital input/output subdevices are fixed
The digital input and output subdevices are the same for all boards
supported by this driver. Remove the defines just open-code the values
in the attach function.
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_pci9111: analog output subdevice is fixed
The analog output subdevice is the same for all boards supported
by this driver. Remove the boardinfo for it and just open-code
the values in the attach function.
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>
Cleanup the function to follow the comedi standard for digital
outputs. The 'mask' does not need to be checked, the comedi core
will make sure that it is valid based on the subdevice data.
The outputs only need to be updated if the 'mask' indicates
something is changing, otherwise we just need to return the
current "state" of the outputs.
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_pci9111: use 8253 helper functions
The timer on this board is a standard 8254 compatible counter/timer.
Instead of open-coding the 8254 timer io, use the helper functions
provided by 8253.h.
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>
Merge tag 'iio-for-3.7c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-next
Third set of IIO rework and new drivers for the 3.7 cycle.
This set includes:
1) HID sensor drivers. This includes a core elements in the
HID subsystem merged through the IIO tree because we have some
ABI changes outstanding (some in this set) which will effect them.
The HID sensors specification covers an extremely wide range of
sensors so we will probably be seeing lots more elements of this
as the hardware hits the market.
2) Some general abi cleanups to use the utility function
iio_push_to_buffer and to drop the used timestamp parameter
from the same call. For a long time timestamps have taken
the same path as all other channel types into the buffers so
it is good to clean this out.
3) More ADC driver support for Analog Devices parts in the form
of one new driver and some additional supported parts via current
drivers.
4) An increase to the accuracy of the calibration scale for
the isl29018 driver.
the switch case doesn't have a break statement of DIDmsg_dot11req_mibget,
and DIDmsg_dot11req_mibset cases, and also cleanup the code to follow
the kernel coding way
drivers/staging/wlan-ng/prism2fw.c:240:5: warning: symbol 'prism2_fwapply' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:379:5: warning: symbol 'crcimage' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:443:6: warning: symbol 'free_chunks' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:465:6: warning: symbol 'free_srecs' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:492:5: warning: symbol 'mkimage' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:585:5: warning: symbol 'mkpdrlist' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:659:5: warning: symbol 'plugimage' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:767:5: warning: symbol 'read_cardpda' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:857:5: warning: symbol 'read_fwfile' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:981:5: warning: symbol 'writeimage' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:1133:5: warning: symbol 'validate_identity' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:127:18: warning: symbol 's3data' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:130:14: warning: symbol 'ns3plug' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:131:18: warning: symbol 's3plug' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:134:14: warning: symbol 'ns3crc' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:135:17: warning: symbol 's3crc' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:138:14: warning: symbol 'ns3info' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:139:18: warning: symbol 's3info' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:142:5: warning: symbol 'startaddr' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:145:14: warning: symbol 'nfchunks' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:146:17: warning: symbol 'fchunk' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:154:12: warning: symbol 'pda' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:155:21: warning: symbol 'nicid' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:156:20: warning: symbol 'rfid' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:157:20: warning: symbol 'macid' was not declared. Should it be static?
drivers/staging/wlan-ng/prism2fw.c:158:20: warning: symbol 'priid' was not declared. Should it be static?
fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement
staging/rts_pstor: remove braces {} in rtsx_scsi.c
fixed below checkpatch warnings.
-WARNING: braces {} are not necessary for single statement blocks
-WARNING: braces {} are not necessary for any arm of this statement