[go: nahoru, domu]

History log of /drivers/staging/media/lirc/lirc_serial.c
Revision Date Author Comments
20f4f1a0536c20ccd870a04b14cabf87c0fa295c 21-Sep-2014 Tapasweni Pathak <tapaswenipathak@gmail.com> staging: media: lirc: remove unnecessary break after return

This patch fixes checkpatch.pl warning in lirc_serial.c file
WARNING : break is not useful after goto or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c5366563d5b1372c8ef6d2863ac315bd98674232 21-Sep-2014 Tapasweni Pathak <tapaswenipathak@gmail.com> Staging: media: lirc: fixed else after return or break warning

This patch fixes checkpatch.pl warning in file lirc_serial.c
WARNING : else is not generally useful after a break or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5ad6ae1acfd883d8f4c8998b4e5bc9d4aea7985f 21-Sep-2014 Gulsah Kose <gulsah.1004@gmail.com> staging: media: lirc: Fixes missing blank line warning.

Fixes "Missing a blank line after declarations" checkpatch.pl warning in
lirc_serial.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
56a65a1eb0151c60f4fd059e8e47cb4c98fec871 03-Jul-2014 Himangi Saraogi <himangi774@gmail.com> [media] staging: lirc: Introduce the use of managed interfaces

This patch introduces the use of managed interfaces like
devm_request_mem_region and devm_request_irq and does away with the
calls to free the allocated memory in the probe and remove functions.
The remove function is no longer required and is removed completely.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
3746cfb684cdd9cce843e914012ec56e7064dbe2 26-May-2014 Paul Bolle <pebolle@tiscali.nl> staging: lirc: remove checks for CONFIG_LIRC_SERIAL_NSLU2

When support for homebrew serial port receivers was added in v2.6.36 its
code contained checks for CONFIG_LIRC_SERIAL_NSLU2. The related Kconfig
symbol didn't exist then. It still doesn't exist now. Remove these checks.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
465b8229acd01bbb72fea89ee6f3657071952bdf 08-May-2014 Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> [media] staging: lirc: Fix sparse warnings

Fix sparse warnings by adding __user and __iomem annotations where
necessary and removing certain unnecessary casts. While at it,
also use u32 in place of __u32.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
12a7208386ac6bb114d1816ecfb6a9da3f179616 08-May-2014 Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> staging: lirc: Fix sparse warnings

Fix sparse warnings by adding __user and __iomem annotations where
necessary and removing certain unnecessary casts. While at it,
also use u32 in place of __u32.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
986058e1ef342363a2d77233bbc07bb0a0264f6b 13-Jan-2014 Mauro Carvalho Chehab <m.chehab@samsung.com> [media] lirc_parallel: avoid name conflict on mn10300 arch

The "irq_handler" name is already defined there on a header
file:

/devel/v4l/temp/drivers/staging/media/lirc/lirc_parallel.c:223:13: error: conflicting types for ‘irq_handler’
static void irq_handler(void *blah)
^
In file included from /devel/v4l/temp/arch/mn10300/include/asm/reset-regs.h:16:0,
from /devel/v4l/temp/arch/mn10300/include/asm/irq.h:18,
from /devel/v4l/temp/include/linux/irq.h:24,
from /devel/v4l/temp/arch/mn10300/include/asm/hardirq.h:16,
from /devel/v4l/temp/include/linux/preempt_mask.h:5,
from /devel/v4l/temp/include/linux/sched.h:25,
from /devel/v4l/temp/include/linux/utsname.h:5,
from /devel/v4l/temp/arch/mn10300/include/asm/elf.h:15,
from /devel/v4l/temp/include/linux/elf.h:4,
from /devel/v4l/temp/include/linux/module.h:14,
from /devel/v4l/temp/drivers/staging/media/lirc/lirc_parallel.c:29:
/devel/v4l/temp/arch/mn10300/include/asm/exceptions.h:107:24: note: previous declaration of ‘irq_handler’ was here
extern asmlinkage void irq_handler(void);

/devel/v4l/patchwork/drivers/staging/media/lirc/lirc_serial.c:653:20: error: conflicting types for ‘irq_handler’
static irqreturn_t irq_handler(int i, void *blah)
^
In file included from /devel/v4l/patchwork/arch/mn10300/include/asm/reset-regs.h:16:0,
from /devel/v4l/patchwork/arch/mn10300/include/asm/irq.h:18,
from /devel/v4l/patchwork/include/linux/irq.h:24,
from /devel/v4l/patchwork/arch/mn10300/include/asm/hardirq.h:16,
from /devel/v4l/patchwork/include/linux/preempt_mask.h:5,
from /devel/v4l/patchwork/include/linux/sched.h:25,
from /devel/v4l/patchwork/include/linux/utsname.h:5,
from /devel/v4l/patchwork/arch/mn10300/include/asm/elf.h:15,
from /devel/v4l/patchwork/include/linux/elf.h:4,
from /devel/v4l/patchwork/include/linux/module.h:14,
from /devel/v4l/patchwork/drivers/staging/media/lirc/lirc_serial.c:53:
/devel/v4l/patchwork/arch/mn10300/include/asm/exceptions.h:107:24: note: previous declaration of ‘irq_handler’ was here
extern asmlinkage void irq_handler(void);

So, rename it, to avoid namespace conflicts.

This patch fixes building media drivers with allyesconfig/almodconfig on
mn10300 arch.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
70a51d284be020a310d9f5ec989cfe2bbce5ecd6 11-Nov-2013 Matina Maria Trompouki <mtrompou@gmail.com> Staging: lirc: fix quoted string split across lines

This patch removes the following warning reported by checkpatch.pl

WARNING: quoted string split across lines

drivers/staging/media/lirc/lirc_igorplugusb.c
drivers/staging/media/lirc/lirc_imon.c
drivers/staging/media/lirc/lirc_serial.c
drivers/staging/media/lirc/lirc_zilog.c

Signed-off-by: Matina Maria Trompouki <mtrompou@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
05323e78161b4396c31e7ed8d84670461805fb97 01-Nov-2013 Archana kumari <archanakumari959@gmail.com> staging: media: lirc: fixed sparse warnings by adding __user annotations in lirc_serial.c

This patch fixes sparse warning by adding __user annotations in
lirc_serial.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ce01cbdc54d6869f0ee3230be2b8cfc9fd1366f3 01-Nov-2013 Mauro Carvalho Chehab <m.chehab@samsung.com> [media] uvc/lirc_serial: Fix some warnings on parisc arch

On this arch, usec is not unsigned long. So, we need to typecast,
in order to remove those warnings:
drivers/media/usb/uvc/uvc_video.c: In function 'uvc_video_clock_update':
drivers/media/usb/uvc/uvc_video.c:678:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 9 has type '__kernel_suseconds_t' [-Wformat]
drivers/staging/media/lirc/lirc_serial.c: In function 'irq_handler':
drivers/staging/media/lirc/lirc_serial.c:707:5: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type '__kernel_suseconds_t' [-Wformat]
drivers/staging/media/lirc/lirc_serial.c:707:5: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type '__kernel_suseconds_t' [-Wformat]
drivers/staging/media/lirc/lirc_serial.c:719:5: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type '__kernel_suseconds_t' [-Wformat]
drivers/staging/media/lirc/lirc_serial.c:719:5: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type '__kernel_suseconds_t' [-Wformat]
drivers/staging/media/lirc/lirc_serial.c:728:6: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type '__kernel_suseconds_t' [-Wformat]
drivers/staging/media/lirc/lirc_serial.c:728:6: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type '__kernel_suseconds_t' [-Wformat]

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
b336cb29ae1b564d9368495f9d89e2e9bdc6023e 10-Sep-2013 Linus Walleij <linus.walleij@linaro.org> staging: media/lirc: switch to use gpiolib

The lirc serial module has special hooks to work with NSLU2,
switch these over to use gpiolib, as that is available on the
ixp4 platform.

Not even compile tested as there is no way to select this
driver from menuconfig on the ixp4 platform.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
df4f07b5066f3db4270e5b3240fd8292fd28aebb 08-Nov-2012 YAMANE Toshiaki <yamanetoshi@gmail.com> [media] staging/media: Use pr_ printks in lirc/lirc_serial.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ...
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
6dd1119528d68e6f3a04874792048fc7be7611d7 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> staging: lirc: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fd8413a2b8328801133e95b58d751bfe48b34303 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> staging: lirc: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
01f6f49b0abe4c0ca39e7af577f3dd889f0c6d78 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> staging: lirc: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
895507c19f88b7bbf82f24737d86cca0398647cb 14-Oct-2012 Paul Bolle <pebolle@tiscali.nl> [media] staging: lirc_serial: silence GCC warning

Building lirc_serial.o triggers this GCC warning:
drivers/staging/media/lirc/lirc_serial.c: In function '__check_sense':
drivers/staging/media/lirc/lirc_serial.c:1301:1: warning: return from incompatible pointer type [enabled by default]
This can be trivially fixed by changing the 'sense' parameter from bool
to int. But, to be safe, we also need to make sure 'sense' will only be
-1, 0, or 1. There's no need to document the new values that are now
allowed for the 'sense' parameter, since they're basically useless.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ac6e4c1560f8d3d18e6ba265d84ff03810496f4f 26-May-2012 Sasha Levin <levinsasha928@gmail.com> [media] USB: Staging: media: lirc: initialize spinlocks before usage

Initialize the spinlock for each hardware time.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9ffc93f203c18a70623f21950f1dd473c9ec48cd 28-Mar-2012 David Howells <dhowells@redhat.com> Remove all #inclusions of asm/system.h

Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:

perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`

Signed-off-by: David Howells <dhowells@redhat.com>
b47acf2a161b2f3001bf50dfa740477db6d32327 05-Mar-2012 Justin P. Mattock <justinmattock@gmail.com> [media] staging: Fix comments and some typos in staging/media/*

linux-next:
I like to spend some time reading code, in doing so I have found some
typos in some of the comments.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
90ab5ee94171b3e28de6bb42ee30b527014e0be7 13-Jan-2012 Rusty Russell <rusty@rustcorp.com.au> module_param: make bool parameters really bool (drivers & misc)

module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
affc9a0d59ac49bd304e2137bd5e4ffdd6fdfa52 16-Nov-2011 Ben Hutchings <ben@decadent.org.uk> [media] staging: lirc_serial: Do not assume error codes returned by request_irq()

lirc_serial_probe() must fail if request_irq() returns an error, even if
it isn't EBUSY or EINVAL,

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9b98d60679711753e548be15c6bef5239db6ed64 16-Nov-2011 Ben Hutchings <ben@decadent.org.uk> [media] staging: lirc_serial: Fix bogus error codes

Device not found? ENODEV, not EINVAL.
Write to read-only device? EPERM, not EBADF.
Invalid argument? EINVAL, not ENOSYS.
Unsupported ioctl? ENOIOCTLCMD, not ENOSYS.
Another function returned an error code? Use that, don't replace it.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1ff1d88e862948ae5bfe490248c023ff8ac2855d 16-Nov-2011 Ben Hutchings <ben@decadent.org.uk> [media] staging: lirc_serial: Fix deadlock on resume failure

A resume function cannot remove the device it is resuming!

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c8e57e1b766c2321aa76ee5e6878c69bd2313d62 16-Nov-2011 Ben Hutchings <ben@decadent.org.uk> [media] staging: lirc_serial: Free resources on failure paths of lirc_serial_probe()

Failure to allocate the I/O region leaves the IRQ allocated.
A later failure leaves them both allocated.

Reported-by: Torsten Crass <torsten.crass@eBiology.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9105b8b200410383d0854bbe237ee385d7d33ba6 16-Nov-2011 Ben Hutchings <ben@decadent.org.uk> [media] staging: lirc_serial: Fix init/exit order

Currently the module init function registers a platform_device and
only then allocates its IRQ and I/O region. This allows allocation to
race with the device's suspend() function. Instead, allocate
resources in the platform driver's probe() function and free them in
the remove() function.

The module exit function removes the platform device before the
character device that provides access to it. Change it to reverse the
order of initialisation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
4860c73804c6e7ef8e69f98958489bb2bea6f6d2 02-Nov-2011 Mauro Carvalho Chehab <mchehab@redhat.com> staging: Move media drivers to staging/media

In practice, it is being hard to distinguish when a patch
should go to staging tree or to the media tree. Better
to distinguish it, by putting the media drivers at a
separate staging directory. Newer staging drivers that include
anything with "dvb*.h", "v4l2*.h" or "videodev2.h" should
go to the drivers/staging/media tree.

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>