On Mon, Feb 23, 2015 at 12:16:16PM +0100, Peter Senna Tschudin wrote:
> sparse was complaining that symbol 'vgamode' was not declared.
>
> Declaring vgamode as static.
a similar patch has already been sent to Greg, which is not yet applied.
regards
sudip
>
> Signed-off-by: Peter Senna Tschudin
Hi!
>
> The patchset fixes invalid memory accesses in certain race scenarios by
> moving ownership of struct power_supply to the core. All drivers are
> modified.
Ok, who can apply the patches? Sebastian?
Pavel
--
(english
During the attach of this driver a couple commands are sent to the hardware
with usb_bulk_msg() to read the firmware version information. This information
is then dumped as dev_info() kernel messages. Thee messages are just added
noise and don't effect the operation of the driver.
For simplicity,
Convert this driver to use the comedi_8254 module to provide the 8254 timer
support.
Add 'clock_src' and 'gate_src' members to the comedi_8254 data for convienence.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/Kconfig
All the comedi drivers have been converted to use the comedi_8254 module
to provide support for the 8254 timers. Remove this unused header.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/drivers/8253.h | 347
The hardware supported by this driver includes an 8254 timer. This timer is
not currently used, other than setting counters 1 and 2 to MODE4 to ensure
that the outputs are high.
For aesthetics, convert it to use the comedi_8254 module to provide support
for the 8254 timer. This will make it easier
Only two of the boards supported by this driver have an 8254 counter/timer.
Both of these boards have a single 8254 device. Currently the counter
subdevice functions are coded to support multiple 8254 devices. This is
unnecessary and just complicates the code.
Simplfy the subdevice functions to wo
This member is only used in the "set gate" and "set clock" helper functions.
Remove
it and calculate the value when needed.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/drivers/amplc_dio200_common.c | 7 ++-
1 file change
This series introduces a new module. comedi_8254, to support the 8254 timer
devices that are commonly found on data acquisition card. This module replaces
the current support provided by the inline functions in 8253.h and consolidates
the subdevice support code found in the comedi drivers.
v2: fix
Currently this driver uses a spinlock in the 8254 subdevice (*insn_read),
(*insn_write),
and (*insn_config) functions. The comedi core checks if the subdevice is
'busy', in
parse_insn(), before any of the subdevice functions are attempted.
Remove the unnecessary spinlock.
Signed-off-by: H Hartl
A 8254 timer/counter is commonly used on data acquisition boards to provide
the internal pacer clock used to acquire analog input samples. Some boards
also to allow the timers to be used externally.
Currently the 8254 timers are supported by comedi using the 8253.h header
and a number of inline fu
The hardware supported by this driver includes an 8254 timer. For aesthetics,
convert it to use the comedi_8254 module to provide support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/Kconfig |
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Note that the pacer does not have to be stopped when starting a new async
command in pcl818_ai_cmd() or when the card i
Replace the DIO200_[XYZ]GAT_SEL defines with a macro that returns the
correct register offset.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/drivers/amplc_dio200_common.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions
The boardinfo for the 8254 timer is overly complex. The 8254 timer always has
3 channels and the 'regs' and 'specflags' members of diosubd_data are not
used. The only necessary information is the base 'addr' offset to the 8254
registers.
Replace the 's8254' member with an unsigned long 'timer_regb
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
The hardware actually has two 8254 devices. Timer B0 is the master for timed
conversions, timer B1 sets the scan pacing,
Replace the DIO200_[XYZ]CLK_SEL defines with a macro that returns the
correct register offset.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/drivers/amplc_dio200_common.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions
This member is only used one place in the driver. Remove it and calculate the
register offset when needed.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/drivers/amplc_dio200_common.c | 4 +---
1 file changed, 1 insertion(+), 3
The hardware supported by this driver does not have an 8254 timer. Remove the
unnecessary include of "8253.h".
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/drivers/cb_pcidas64.c | 1 -
1 file changed, 1 deletion(-)
diff --git
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: fix logic error with 'regshift'
driv
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. It also provides a comedi_subdevice to allow the user
to use channel 0 of the 8254 timer. Currently the subdevice support does not
work correctly due to and (*insn_config) that does not follow the com
This member is only used one place in the driver. Remove it and calculate the
register offset when needed.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/drivers/amplc_dio200_common.c | 9 ++---
1 file changed, 2 insertions(
The 'counter_number' in these functions is the comedi channel number from the
chanspec. The comedi core validates the chanspec before calling the driver
functions. Remove the unnecessary checks.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/s
Some of the hardware supported by this driver include an 8254 timer. For
aesthetics, convert it to use the comedi_8254 module to provide support for
the 8254 timer.
This also fixes the (*insn_read) and (*insn_write) to work like the comedi
API expects. Currently they only read or write a single va
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Tidy up the (*do_cmdtest) validation of the timer arguments.
Absorb the converted das1800_setup_counters() code into th
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Remove the unnecessary programming of timer 0. The private data 'count'
value is never set by the driver and the timer i
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/Kco
Some of the hardware supported by this driver includes an 8254 timer. For
aesthetics, convert it to use the comedi_8254 module to provide support for
the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/Kconfig
This driver uses two 8254 timers to generate the pacer clocks. One for analog
input acquisition and one for analog output data conversion. Convert it to use
the comedi_8254 module to provide support for the 8254 timers.
Use the comedi_device 'pacer' member for the 8254 timer used for analog input.
This driver uses an 8254 timer to generate the pacer clock used for analog
output data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/Kc
This driver uses two 8254 timers. One to generate the analog input pacer clock
and
one to count the number of samples. Convert it to use the comedi_8254 module to
provide support for the 8254 timers.
Use the comedi_device 'pacer' member for the 8254 timer used for analog input.
This
data is free
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/Kco
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/Kc
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: fix logic error with 'regshift'
dri
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/Kco
Some of the hardware supported by this driver include an 8254 timer that is
exposed to the user as a comedi_subdevice. Convert it to use the comedi_8254
module to provide support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drive
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
v2: no change
drivers/staging/comedi/Kc
The hardware supported by this drive has an 8254 timer. Currently this driver
does not use the timer functions.
For aesthetics, use the comedi_8254 module to provide support for the 8254
timer. This will ensure that the counters are all reset and make it easier
to add functionality later.
Signed-
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Note that the pacer does not have to be stopped when starting a new async
command in pcl812_ai_cmd() or when the card i
Add a new member to the comedi_device struct for a comedi_8254 'pacer'. This
provides a convient place to store the data allocated by the comedi_8254 module
for boards that use an 8254 device to create the data acquisition pacer clock.
Automatically free this pointer in comedi_device_detach_cleanu
On Monday, February 23, 2015 11:58 AM, Ian Abbott wrote:
> On 20/02/15 23:05, H Hartley Sweeten wrote:
>> Convert this driver to use the comedi_8254 module to provide the 8254 timer
>> support.
>>
>> Add 'clock_src' and 'gate_src' members to the comedi_8254 data for
>> convienence.
>>
>> Signed-o
On 23/02/15 19:53, Hartley Sweeten wrote:
Actually, since the information is just used in kernel log messages can we
just remove it?
I suppose so.
--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Web: http://www.mev.co.uk/ )=-
_
2015-02-23 21:27 GMT+02:00 Noralf Trønnes :
> Yes, it's best to leave this alone for now.
> I'm working on a proposal to provide better layering and minimal coupling
> to fbdev. This will hopefully lead to screen_base eventually being used
> only twice in the fbtft module and nowhere else.
Ok, sta
The "stalled" variable this function is used to detect if the DMA operation
is stalled while trying to disable DMA on a full comedi sample. The reset
of this variable should only occur when the remaining bytes of the DMA
transfer does not equal the remaining bytes from the last check.
Reported-by:
Daniele Alessandrelli writes:
> Fix all checkpatch "braces {} are not necessary" warnings for
> rtl8723au/hal/rtl8723a_hal_init.c
>
> Signed-off-by: Daniele Alessandrelli
> ---
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 40
> ---
> 1 file changed, 14 insertions(+)
On 23/02/15 18:31, Hartley Sweeten wrote:
On Monday, February 23, 2015 11:06 AM, Ian Abbott wrote:
On 20/02/15 23:04, H Hartley Sweeten wrote:
+ unsigned int val;
+
+ switch (i8254->iosize) {
+ default:
+ case I8254_IO8:
+ if (i8254->mmio)
+
On 20/02/15 23:05, H Hartley Sweeten wrote:
Convert this driver to use the comedi_8254 module to provide the 8254 timer
support.
Add 'clock_src' and 'gate_src' members to the comedi_8254 data for convienence.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drive
On 20/02/15 23:05, H Hartley Sweeten wrote:
This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
From: Matteo Semenzato
This patch fixes the following error:
space prohibited before that ','
Signed-off-by: Matteo Semenzato
---
drivers/staging/fbtft/fb_ili9340.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ili9340.c
b/drivers/stag
From: Matteo Semenzato
This patch fixes the following error:
space prohibited before that ','
Signed-off-by: Matteo Semenzato
---
drivers/staging/fbtft/fb_ra8875.c | 150 +++---
1 file changed, 75 insertions(+), 75 deletions(-)
diff --git a/drivers/staging/fbtf
Use power_supply_put() to decrement the power supply's device reference
counter.
Signed-off-by: Krzysztof Kozlowski
Reviewed-by: Bartlomiej Zolnierkiewicz
Reviewed-by: Sebastian Reichel
Acked-by: Robert Jarzmik
---
arch/arm/mach-pxa/raumfeld.c | 4 +++-
1 file changed, 3 insertions(+), 1 dele
Use power_supply_put() to decrement the power supply's device reference
counter.
Signed-off-by: Krzysztof Kozlowski
Acked-by: Pavel Machek
Reviewed-by: Bartlomiej Zolnierkiewicz
Reviewed-by: Sebastian Reichel
---
drivers/power/charger-manager.c | 70 +++--
Use power_supply_put() to decrement the power supply's device reference
counter (increased by power_supply_get_by_name() or
power_supply_get_by_phandle()).
Signed-off-by: Krzysztof Kozlowski
Acked-by: Pavel Machek
Reviewed-by: Bartlomiej Zolnierkiewicz
Reviewed-by: Sebastian Reichel
---
drive
Use power_supply_put() to decrement the power supply's device reference
counter.
Signed-off-by: Krzysztof Kozlowski
Acked-by: Pavel Machek
Reviewed-by: Bartlomiej Zolnierkiewicz
Reviewed-by: Sebastian Reichel
---
drivers/power/88pm860x_charger.c | 11 +--
1 file changed, 9 insertions(
Increment the power_supply.use_cnt usage counter on:
- power_supply_get_by_phandle()
- power_supply_get_by_name()
and decrement it on power_supply_put() call.
This helps tracking of valid usage of power supply instance by
consumers. The usage counter itself also allows safe calling of
power_supp
Use power_supply_put() to decrement the power supply's device reference
counter.
Signed-off-by: Krzysztof Kozlowski
Acked-by: Pavel Machek
Acked-by: Linus Walleij
Acked-by: Lee Jones
Reviewed-by: Bartlomiej Zolnierkiewicz
Reviewed-by: Sebastian Reichel
---
drivers/mfd/ab8500-sysctrl.c | 2 +
Replace direct usage of put_device() with new API: power_supply_put().
Signed-off-by: Krzysztof Kozlowski
Acked-by: Pavel Machek
Reviewed-by: Bartlomiej Zolnierkiewicz
Reviewed-by: Sebastian Reichel
---
arch/x86/platform/olpc/olpc-xo1-sci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletio
Replace direct usage of put_device() with new API: power_supply_put().
Signed-off-by: Krzysztof Kozlowski
Acked-by: Pavel Machek
Reviewed-by: Bartlomiej Zolnierkiewicz
Reviewed-by: Sebastian Reichel
---
arch/x86/platform/olpc/olpc-xo15-sci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deleti
Replace direct calls to power supply function attributes with wrappers.
Wrappers provide safe access in case of unregistering the power
supply (e.g. by removing the driver). Replace:
- get_property -> power_supply_get_property
Signed-off-by: Krzysztof Kozlowski
Acked-by: Jonghwa Lee
Acked-by: P
Add new structure 'power_supply_config' for holding run-time
initialization data like of_node, supplies and private driver data.
The power_supply_register() function is changed so all power supply
drivers need updating.
When registering the power supply this new 'power_supply_config' should be
us
The power_supply_get_by_phandle() and power_supply_get_by_name() use
function class_find_device() for obtaining the reference to power
supply. Each use of class_find_device() increases the power supply's
device reference counter.
However the reference counter was not decreased by users of this API
Replace direct calls to power supply function attributes with wrappers.
Wrappers provide safe access in case of unregistering the power
supply (e.g. by removing the driver). Replace:
- get_property -> power_supply_get_property
Signed-off-by: Krzysztof Kozlowski
Acked-by: Jonghwa Lee
Acked-by: P
Replace direct calls to power supply function attributes with wrappers.
Wrappers provide safe access in case of unregistering the power
supply (e.g. by removing the driver). Replace:
- get_property -> power_supply_get_property
- set_property -> power_supply_set_property
- property_is_writeable -
Replace direct calls to power supply function attributes with wrappers.
Wrappers provide safe access in case of unregistering the power
supply (e.g. by removing the driver). Replace:
- get_property -> power_supply_get_property
Signed-off-by: Krzysztof Kozlowski
Acked-by: Jonghwa Lee
Acked-by: P
Replace direct calls to power supply function attributes with wrappers.
Wrappers provide safe access in case of unregistering the power
supply (e.g. by removing the driver). Replace:
- get_property -> power_supply_get_property
Signed-off-by: Krzysztof Kozlowski
Acked-by: Jonghwa Lee
Acked-by: P
Replace direct calls to power supply function attributes with wrappers.
Wrappers provide safe access in case of unregistering the power
supply (e.g. by removing the driver). Replace:
- get_property -> power_supply_get_property
- set_property -> power_supply_set_property
Signed-off-by: Krzysztof
Replace direct calls to power supply function attributes with wrappers.
Wrappers provide safe access in case of unregistering the power
supply (e.g. by removing the driver). Replace:
- get_property -> power_supply_get_property
Signed-off-by: Krzysztof Kozlowski
Acked-by: Jonghwa Lee
Acked-by: P
Hi,
The patchset fixes invalid memory accesses in certain race scenarios by
moving ownership of struct power_supply to the core. All drivers are
modified.
TLDR for driver and subsystem maintainers
=
Two patches of patchset change power_supply_register() f
Add simple wrappers for accessing power supply's function attributes:
- get_property -> power_supply_get_property
- set_property -> power_supply_set_property
- property_is_writeable -> power_supply_property_is_writeable
- external_power_changed -> power_supply_external_power_changed
This API a
Allow drivers to store private data inside power_supply structure for
later usage in power supply operations.
Usage of driver private data is necessary to access driver's state
container object from power supply calls (like get_property()) if struct
'power_supply' is a stored there as a pointer, f
On 20/02/15 19:52, H Hartley Sweeten wrote:
The read/write of the PLX_INTRCS_REG during the driver detach is not
necessary. The rtd_reset() function writes 0 to this register which
will disable all interrupts.
This also fixes a dereference after null check reported by coverity.
Reported-by: cov
On 20/02/15 19:52, H Hartley Sweeten wrote:
The {min,max}_scan_divisor values could overflow due to the
unsigned int * insigned int calculation. Change the type of the
local variable 'convert_divisor' to unsigned long long to avoid
the possible overflow.
Reported-by: coverity (CID 200653)
Signed
sparse was complaining that symbol 'vgamode' was not declared.
Declaring vgamode as static.
Signed-off-by: Peter Senna Tschudin
---
Tested by compilation only
drivers/staging/sm7xxfb/sm7xx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/d
On 20/02/15 19:52, H Hartley Sweeten wrote:
The quick exit check of (mode == MODE_SINGLE_CHAN) results in coverity
reporting a logically dead code issue in the switch code in
labpc_ai_check_chanlist().
Remove the quick exit check and allow the function to handle the
MODE_SINGLE_CHAN normally (th
On 20/02/15 19:52, H Hartley Sweeten wrote:
usb_blk_msg() will return the passed 'len' (64) as the 'actual_len' (cnt) of
That's usb_bulk_msg().
the transfer. The addition of the '\0' to the end of the returned string will
overrun the 'rx' array. Increase the array size by 1 to fix the out-of-
75 matches
Mail list logo