Add and remove newlines to improve code readability in preparation for
moving the driver out of staging.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/dr
Most of the values in the #defines have their values aligned on a single
column, but some do not. This changes the remaining defines to use
consistent alignment with the majority to improve code readability.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 10 +-
1 f
When updating the in_illuminance_calibscale and
in_illuminance_integration_time sysfs attributes, these values were not
actually written to the chip. The chip would continue to use the old
parameters. Extracted out tsl2583_set_als_gain() and
tsl2583_set_als_time() functions that are now called when
The first 7 patches in this series contains version 2 of the patches
7-9 that I sent out on 2016-11-03. The only change is that the patches
are split up further to make the code review easier.
Patches 8-23 in this series are new and some of the highlights include:
- Moved from a global lux table
taos_probe() calls i2c_smbus_write_byte() to select the control
register, however there are no subsequent calls to
i2c_smbus_read_byte(). The write call is unnecessary and is removed by
this patch.
Verified that the driver still functions correctly using a TSL2581
hooked up to a Raspberry Pi 2.
S
Address warning from checkpatch:
CHECK: Do not include the paragraph about writing to the Free Software
Foundation's mailing address from the sample GPL notice. The FSF has
changed addresses in the past, and may do so again. Linux already
includes a copy of the GPL.
Signed-off-by: Brian Masney
-
taos_get_lux checks to see if the chip is in a working state. This
check is not necessary since it is only called from tsl2583_read_raw
and in_illuminance_calibrate_store (via taos_als_calibrate). The chip
state is already checked by these functions.
Signed-off-by: Brian Masney
---
drivers/stagi
in_illuminance_calibrate_store() did not check to see if the chip is
suspended. This patch adds the proper check. The return value from
taos_als_calibrate() was also not checked in this function, so the
proper check was also added while changes are being made here.
Signed-off-by: Brian Masney
---
There are several places in the code where the function name is
hardcoded in the log message. Use the __func__ constant string to build
the log message. This also clarifies some of the error messages to match
the code and ensures that the correct priority is used since the message
is already being
The device probing and the suspend/resume code checks a flag internal to
the driver that determines whether or not the chip is in a working
state. These checks are not needed. This patch removes the unnecessary
checks. It will do no harm to the hardware if the chip is
reinitialized if it is already
Fixed warning found by make W=2:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/light/tsl2583.
taos_chip_on() reads an eight member array called taos_config
that contains the desired state of the chip's registers. Only four
of the registers actually need to be written to. The four that do
not need to be written to are for the {low,high} byte of the lower
interrupt threshold and the {low,high
Added Brian Masney's copyright to the header and to the MODULE_AUTHOR
for all of the staging cleanups that has been done to this driver.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/l
in_illuminance_lux_table_store assumes that an unsigned int is 32 bits.
Replace this with sizeof(unsigned int).
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/light/tsl2583.c
b/drivers/s
There are two separate files describing the tsl2583 sysfs attributes.
Combine the two files into one. Updated the name of the sysfs attributes
to match the current ABI.
Signed-off-by: Brian Masney
Suggested-by: Peter Meerwald-Stadler
---
.../Documentation/light/sysfs-bus-iio-light-tsl2583 | 16
Some functions and variables were prefixed with either taos, tsl258x or
tsl2583. Change everything to use the tsl2583 prefix since that is the
name of the .c file. The taos_settings member inside the taos_settings
struct was renamed to als_settings.
Signed-off-by: Brian Masney
---
drivers/stagin
The definition of the tsl2583_device_lux struct has a series of single
line comments. There are two other cases where the multiline comments
did not have an initial blank line. Change these comments to use the
proper multiline syntax.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl
tsl2583_als_calibrate() returns the newly computed gain_trim if the
calibration was successful. This function is only called by
in_illuminance_calibrate_store() and the return value inside that
sysfs attribute is only checked to see if an error was returned.
This patch changes tsl2583_als_calibrate
The check for ch1lux > ch0lux inside tsl2583_get_lux is only valid if
the ratio is not equal to zero. Move the code block inside the else
statement. This does away with the need to initialize the variables to
zero.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 23
The current chip state is represented as a tristate (working, suspended,
and unknown). The unknown state was not used. This patch changes the
chip state so that it is now represented as a single boolean value
(suspended).
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 18 +
in_illuminance_lux_table_store() contains some unnecessary parentheses.
This patch removes them since they provide no value.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/light/tsl25
Move tsl2580, tsl2581, tsl2583 driver out of staging into mainline.
Signed-off-by: Brian Masney
---
.../ABI/testing/sysfs-bus-iio-light-tsl2583| 20 +
drivers/iio/light/Kconfig | 7 +
drivers/iio/light/Makefile | 1 +
drivers/iio/ligh
The driver contains a global lux table that can be updated via sysfs.
Change this to a per device lux table so that multiple devices can be
hooked up to the same system with different lux tables.
There are 10 entries, plus 1 for the termination segment, set aside for
the entries in the lux table.
If channel 0 does not have any data, then the code sets the lux to zero.
The corresponding comment says that the last value is returned. This
updates the comment to correctly reflect what the code does.
Signed-off-by: Brian Masney
---
drivers/staging/iio/light/tsl2583.c | 2 +-
1 file changed, 1
On Tue, 2016-11-08 at 05:16 -0500, Brian Masney wrote:
> There are several places in the code where the function name is
> hardcoded in the log message. Use the __func__ constant string to build
> the log message. This also clarifies some of the error messages to match
> the code and ensures that t
On Monday, November 7, 2016 4:48:35 PM CET Michael Zoran wrote:
> .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 269
> +
> .../vc04_services/interface/vchiq_arm/vchiq_if.h | 25 ++
> .../interface/vchiq_arm/vchiq_ioctl.h | 102
> 3 files changed
Change loff_t to u64 in lov_object_fiemap() since loff_t is a signed
value type.
Otherwise there could be an overflow in
drivers/staging/lustre/lustre/lov/lov_object.c:1241 lov_object_fiemap()
warn: signed overflow undefined. 'fm_start + fm_length < fm_start'
Reported-by: Dan Carpenter
Signed-of
Add fiemap_for_stripe() to get file map extent from each stripe
device.
Signed-off-by: Bobi Jam
---
drivers/staging/lustre/lustre/lov/lov_object.c | 441 +
1 file changed, 225 insertions(+), 216 deletions(-)
diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c
b/
Use the tty get_icount operation instead of implementing TIOCGICOUNT
directly.
Signed-off-by: Johan Hovold
---
drivers/staging/greybus/uart.c | 31 ---
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/gre
Drop invalid user-pointer check from TIOCGSERIAL handler.
A NULL-pointer can be valid in user space and copy_to_user() takes care
of sanity checking.
Signed-off-by: Johan Hovold
---
drivers/staging/greybus/uart.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/greybus/uart
The regulator changes assigned data to an uninitialized pointer:
drivers/staging/iio/frequency/ad9832.c: In function 'ad9832_probe':
drivers/staging/iio/frequency/ad9832.c:214:11: error: 'st' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
This moves the allocation of th
Removing a call to the taos_chip_off() makes it unused when CONFIG_PM
is disabled:
drivers/staging/iio/light/tsl2583.c:438:12: error: ‘taos_chip_off’ defined but
not used [-Werror=unused-function]
This removes all the #ifdef in this file, and marks the PM functions as
__maybe_unused instead, whi
Follow the kernel type preferrences of using 's16' over 'int16_t'.
Signed-off-by: Shiva Kerdel
---
drivers/staging/fsl-mc/include/mc-bus.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fsl-mc/include/mc-bus.h
b/drivers/staging/fsl-mc/include/mc-bus.h
in
Follow the kernel type preferrences of using 's32' over 'int32_t'.
Signed-off-by: Shiva Kerdel
---
drivers/staging/fsl-mc/include/mc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/fsl-mc/include/mc.h
b/drivers/staging/fsl-mc/include/mc.h
index a781a36..1c4
On Tue, Nov 08, 2016 at 02:29:20AM -0800, Joe Perches wrote:
> On Tue, 2016-11-08 at 05:16 -0500, Brian Masney wrote:
> > There are several places in the code where the function name is
> > hardcoded in the log message. Use the __func__ constant string to build
> > the log message. This also clarif
Replaced decimal permissions with 4 digit octal to solve checkpatch errors.
Signed-off-by: Shiva Kerdel
---
drivers/staging/xgifb/XGI_main_26.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c
b/drivers/staging/xgifb/XGI_main_26.c
i
> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, November 7, 2016 11:00 PM
> To: Long Li
> Cc: KY Srinivasan ; Haiyang Zhang
> ; Bjorn Helgaas ;
> de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; linux-
> p...@vger.kernel.org
> Subject:
> -Original Message-
> From: Long Li
> Sent: Tuesday, November 8, 2016 8:57 AM
> To: Greg KH
> Cc: KY Srinivasan ; Haiyang Zhang
> ; Bjorn Helgaas ;
> de...@linuxdriverproject.org; linux-ker...@vger.kernel.org; linux-
> p...@vger.kernel.org
> Subject: RE: [Resend] [PATCH] pci-hyperv: use
My Friend,
Compliments of the season, thank you for your help I am very happy to
inform you about my success in getting those funds transfer.Now, I
want you to contact Mr Richard Frank with below contact Email ID:
(w...@grpcco.org ) Ask him to send you the sum of eight hundred and
seventy five tho
This looks messy, weird line wrap??
+/*
+ * Timeout values are based on expecations from host */ #define
+VSS_FREEZE_TIMEOUT (15 * 60)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverd
Please don't add name/date information into comments.
This kind of meta data belongs in the commit message only.
My philosophy is that comments should be reserved for explain the semantics of
the code, not the history.
+ *
+ * KYS: Oct. 30, 2016:
+ * It looks like Windows hosts have logic to dea
From: Long Li
hv_do_hypercall assumes that we pass a segment from a physically
continuous buffer. Buffer allocated on the stack may not work if
CONFIG_VMAP_STACK=y is set.
Change to use kmalloc to allocate this buffer.
The v2 patch adds locking to access the pre-allocated buffer.
Signed-off-by
On 08/11/16 14:00, Arnd Bergmann wrote:
> The regulator changes assigned data to an uninitialized pointer:
>
> drivers/staging/iio/frequency/ad9832.c: In function 'ad9832_probe':
> drivers/staging/iio/frequency/ad9832.c:214:11: error: 'st' may be used
> uninitialized in this function [-Werror=may
On 08/11/16 14:01, Arnd Bergmann wrote:
> Removing a call to the taos_chip_off() makes it unused when CONFIG_PM
> is disabled:
>
> drivers/staging/iio/light/tsl2583.c:438:12: error: ‘taos_chip_off’ defined
> but not used [-Werror=unused-function]
>
> This removes all the #ifdef in this file, and
On 08/11/16 10:16, Brian Masney wrote:
> Added Brian Masney's copyright to the header and to the MODULE_AUTHOR
> for all of the staging cleanups that has been done to this driver.
>
> Signed-off-by: Brian Masney
> ---
> drivers/staging/iio/light/tsl2583.c | 3 ++-
> 1 file changed, 2 insertions(
> -Original Message-
> From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On
> Behalf Of Long Li
> Sent: Tuesday, November 8, 2016 8:57 AM
> To: Greg KH
> Cc: linux-...@vger.kernel.org; Haiyang Zhang ;
> linux-ker...@vger.kernel.org; Bjorn Helgaas ;
> de...@linuxdriverpr
On 08/11/16 10:16, Brian Masney wrote:
> Move tsl2580, tsl2581, tsl2583 driver out of staging into mainline.
>
> Signed-off-by: Brian Masney
A few minor bits and bobs inline - might need to push one or two into relevant
earlier patches, but was easier to just review the whole code in here as
I'm
> -Original Message-
> From: Shiva Kerdel [mailto:sh...@exdev.nl]
> Sent: Tuesday, November 08, 2016 9:42 AM
> To: Stuart Yoder
> Cc: gre...@linuxfoundation.org; german.riv...@freescale.com; German Rivera
> ;
> tred...@nvidia.com; itai.k...@nxp.com; Nipun Gupta ;
> linux-ker...@vger.ke
> -Original Message-
> From: Shiva Kerdel [mailto:sh...@exdev.nl]
> Sent: Tuesday, November 08, 2016 9:42 AM
> To: Stuart Yoder
> Cc: gre...@linuxfoundation.org; german.riv...@freescale.com; German Rivera
> ;
> tred...@nvidia.com; itai.k...@nxp.com; Nipun Gupta ;
> linux-ker...@vger.ke
On Nov 7, 2016, at 19:47, James Simmons wrote:
>
> The ldlm_pool field pl_recalc_time is set to the current
> monotonic clock value but the interval period is calculated
> with the wall clock. This means the interval period will
> always be far larger than the pl_recalc_period, which is
> just a
On Tue, Nov 8, 2016 at 6:01 PM, Johan Hovold wrote:
> Drop invalid user-pointer check from TIOCGSERIAL handler.
>
> A NULL-pointer can be valid in user space and copy_to_user() takes care
> of sanity checking.
>
> Signed-off-by: Johan Hovold
> ---
> drivers/staging/greybus/uart.c | 3 ---
> 1 fi
On Tue, Nov 8, 2016 at 6:01 PM, Johan Hovold wrote:
> Use the tty get_icount operation instead of implementing TIOCGICOUNT
> directly.
>
> Signed-off-by: Johan Hovold
> ---
> drivers/staging/greybus/uart.c | 31 ---
> 1 file changed, 12 insertions(+), 19 deletions(-)
On Tue, Nov 08, 2016 at 03:00:49PM +0100, Arnd Bergmann wrote:
> The regulator changes assigned data to an uninitialized pointer:
>
> drivers/staging/iio/frequency/ad9832.c: In function 'ad9832_probe':
> drivers/staging/iio/frequency/ad9832.c:214:11: error: 'st' may be used
> uninitialized in thi
53 matches
Mail list logo