History log of /drivers/media/video/gspca/sn9c20x.c
Revision Date Author Comments
ff38d58ec08e347f01fc380f774cedde6dec4103 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Cleanup source

- copyright change
- use the kbuild module name for messages
- remove useless code
- add/remove blank lines, parenthesis, braces
- add/change some information messages

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ccbaba430241805076ebd16f90d8456c20bc796a 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Simplify register write for capture start/stop

The bridge register 1061 may take only the values 01 (stop) or 03 (start).

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
92dcffcf20feec54872e9e1c68e177b5549751ec 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Add automatic JPEG compression mechanism

The JPEG compression may be adjusted from the packet fill ratio and from
the flag 'USB FIFO full' returned in each frame.
The code is adapted from the one in gspca sonixj and uses a workqueue.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e71389be3d3059b447309deb83e3023c81233d59 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Greater delay in case of sensor no response

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d4689b740424e8163eefebcd21368a8c6273a7a2 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Optimize the code of write sequences

The new functions i2c_w1_buf() and i2c_w2_buf() handle the write loops.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
4c632e4e51e5d89af75ecf3e958988658c01294f 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Add the JPEG compression quality control

The JPEG compression quality was hardcoded to 95%. This value was too big,
raising often buffer overflows.
This quality is now 80% by default and is settable.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
92884f80b7e5f8d0ffd725a251c81dd45e9e6eb0 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Add a delay after Omnivision sensor reset

The reset of the Omnivision sensors takes a long time (200ms).

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
fe86ec75b992a6bb56955ac61c2cfdcbbde0d809 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Propagate USB errors to higher level

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c5224d81aed8c174d6dd5f406f63f522213c9673 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Use the new video control mechanism

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1f42df0db04356ff9384514e1ec027df9ce3d132 19-Mar-2012 Jean-François Moine <moinejf@free.fr> [media] gspca - sn9c20x: Fix loss of frame start

The frame header was checked on packets of size 64 bytes only, while the webcams
may put a frame header at the beginning of bigger packets.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d80dd5d036147e00a27e3c649aec64bf9e572e9b 01-Jan-2012 Hans de Goede <hdegoede@redhat.com> [media] gscpa - sn9c20x: Add sd_isoc_init ensuring enough bw when i420 fmt

When using the SN9C20X_I420 fmt the sn9c20x needs more bandwidth
than our regular bandwidth calculations reserve.

This patch adds a sd_isoc_init function, which forces the use of a specific
altsetting when using the SN9C20X_I420 fmt.

This fixes the bottom 10-30% of the image getting corrupted when using
the SN9C20X_I420 fmt (which is the default fmt).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
eb3fb7c9633f79077c7c650efe0edec1840926da 01-Jan-2012 Hans de Goede <hdegoede@redhat.com> [media] gspca: Add a need_max_bandwidth flag to sd_desc

Some cameras will pretty much entirely fill all the image buffers all the
time even though they are using compression.

This patch adds a flag to sd_desc, which drivers for such cameras can set.

When this flag is set the bandwidth calculation code will no longer
assume that the image buffer size is a worst case and less bandwidth than
imagebufsize * fps will be used on average.

This patch sets this new flag for 3 drivers:
* For spca561 (for rev12a cameras) and nw80x cams as these simply don't work
when given less bandwidth than imagebufsize * fps.
* For sn9c20x cameras, because these show severy jpeg artifacts when
given less bandwidth than imagebufsize * fps and since these are usb2
cameras there is plenty bandwidth anyways.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ecb3b2b35db49778b6d89e3ffd0c400776c20735 18-Nov-2011 Greg Kroah-Hartman <gregkh@suse.de> USB: convert drivers/media/* to use module_usb_driver()

This converts the drivers in drivers/media/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Cc: Jean-Francois Moine <moinejf@free.fr>
Cc: Frank Zago <frank@zago.net>
Cc: Olivier Lorin <o.lorin@laposte.net>
Cc: Erik Andren <erik.andren@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Brian Johnson <brijohn@gmail.com>
Cc: Leandro Costantino <lcostantino@gmail.com>
Cc: Antoine Jacquet <royale@zerezo.com>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Florian Mickler <florian@mickler.org>
Cc: Antti Palosaari <crope@iki.fi>
Cc: Michael Krufky <mkrufky@kernellabs.com>
Cc: "David Härdeman" <david@hardeman.nu>
Cc: Florent Audebert <florent.audebert@anevia.com>
Cc: Sam Doshi <sam@metal-fish.co.uk>
Cc: Manu Abraham <manu@linuxtv.org>
Cc: Olivier Grenie <olivier.grenie@dibcom.fr>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Cc: "Igor M. Liplianin" <liplianin@me.by>
Cc: Derek Kelly <user.vdr@gmail.com>
Cc: Malcolm Priestley <tvboxspy@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Cc: "André Weidemann" <Andre.Weidemann@web.de>
Cc: Martin Wilks <m.wilks@technisat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jose Alberto Reguero <jareguero@telefonica.net>
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Anssi Hannula <anssi.hannula@iki.fi>
Cc: Rafi Rubin <rafi@seas.upenn.edu>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Paul Bender <pebender@gmail.com>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: "Márcio A Alves" <froooozen@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Chris Rankin <rankincj@yahoo.com>
Cc: Lee Jones <lee.jones@canonical.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Dean Anderson <linux-dev@sensoray.com>
Cc: Pete Eberlein <pete@sensoray.com>
Cc: Arvydas Sidorenko <asido4@gmail.com>
Cc: Andrea Anacleto <andreaanacleto@libero.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
114cfbdf49166d715d51d5c01c1fa4fcdba99e19 23-Sep-2011 Frank Schaefer <fschaefer.oss@googlemail.com> [media] gspca - sn9c20x: Fix status LED device 0c45:62b3

Tested with webcam "SilverCrest WC2130".

Signed-off-by: Frank Schaefer <fschaefer.oss@googlemail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
91f5842b327d4c91f0ab2d9775ac1357054cf951 22-Aug-2011 Joe Perches <joe@perches.com> [media] sn9c20x: Use current logging styles

Add pr_fmt.
Convert usb style logging macros to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
bcc6f669066d490f10484f44561f9c2ebb38c25b 17-Feb-2011 Hans de Goede <hdegoede@redhat.com> [media] gspca_sn9c20x: Add another MSI laptop to the sn9c20x upside down list

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
6899a9c7778a6d19edc74e2ef7dfb6daf21dc366 16-Feb-2011 Hans de Goede <hdegoede@redhat.com> [media] gspca_sn9c20x: Make buffers slightly larger for JPEG frames

In good lighting conditions (lots of details visible) the current buffers
are sometimes too small.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
b39e0cb9018bf95348078ad74b3e0171e985389a 16-Feb-2011 Hans de Goede <hdegoede@redhat.com> [media] gspca_sn9c20x: Add LED_REVERSE flag for 0c45:62bb

This fixes the led not working on this camera

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
779b51f7a5ec0e95dcc3690cd68c2631a971a65e 16-Feb-2011 Hans de Goede <hdegoede@redhat.com> [media] gspca_sn9c20x: Add hflip and vflip controls for the ov7660 sensor

Tested with a camera with usb-id: 0c45:62bb

Also enable dmi based flopped laptop detection for the 0c45:627b ov7660 model.
Some of the MSI laptops with upside down camera have this one instead of the
0c45:624f.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
8bc50f354047f4afb31fc85f0efb6bfe28ce9e57 16-Feb-2011 Hans de Goede <hdegoede@redhat.com> [media] gspca_sn9c20x: Fix colored borders with ov7660 sensor

Tested with a camera with usb-id: 0c45:62bb

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
95c967c167785eb991cf6b22fb854dd8d61d0ff8 13-Jan-2011 Jean-François Moine <moinejf@free.fr> [media] gspca: Remove __devinit, __devinitconst and __devinitdata

__devinit* must not be used in USB drivers.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d162e7aac24bfd8b96881582368f976e7e464c25 07-Dec-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] gspca/sn9c20x: Fix support for mt9m001 (mi1300) sensor

Support for mt9m001 (mi1300) is broken:
- Table is incomplete;
- Only one resolution is currently supported by the driver;
- Resolution is incomplete;
- it complains about broken JPEG headers.

Use the same init found on em28xx driver, and properly report the
output format as 8-bits GRAY.

Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
86701c1d6a3ecae2f0e6771c730364d334d5a142 07-Dec-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] gspca/sn9c20x: Get rid of scale "magic" numbers

Use macros for the supported scales, instead of using magic numbers
from 0 to 3.

Code become cleaner by using macros for it.

Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e78567d227ecd40543508342ba39a3dfba5af14f 06-Dec-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] gspca/sn9c20x: Test if sensor is a OV sensor

Instead of just assuming a ov9650 sensor based on USB ID,
double-check it, by reading the sensor ID.

Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
780e312175f688ab5ab6124c91d46fa2b9afe2d2 19-Oct-2010 Jean-François Moine <moinejf@free.fr> [media] gspca: Fix coding style issues

The errors were found by checkpatch.pl. Most fixes are:
- remove spaces followed by TAB(s),
- split lines greater than 80 characters,
- move most '{'s from start of line to end of previous line.
(Some '{'s at start of line remain when the '}'s are on the same line)

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2856643e2e18f306227ae1257b63fc713d426dc7 01-Oct-2010 Jean-François Moine <moinejf@free.fr> V4L/DVB: gspca - many subdrivers: Handle the buttons when CONFIG_INPUT=m

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9b1d3caea9a531595f7524be94f0bb25897b887e 13-Sep-2010 Jean-François Moine <moinejf@free.fr> V4L/DVB: gspca - sn9c20x: Better image sizes

When compressed, the images take less than one byte per pixel.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
b1e4665b667bcec77d62742fa9238aeac3cb4232 13-Sep-2010 Jean-François Moine <moinejf@free.fr> V4L/DVB: gspca - sn9c20x: Fix the number of bytes per line

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
548264375b1c0d51b418bf7ab6d2fec647307ab7 13-Sep-2010 Jean-François Moine <moinejf@free.fr> V4L/DVB: gspca - all modules: Remove useless module load/unload messages

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
04d174e99a6eca2f62b56c10ae1d7d0499d83e9d 13-Sep-2010 Jean-François Moine <moinejf@free.fr> V4L/DVB: gspca - sn9c20x: Bad transfer size of Bayer images

As the end of frame marker does not contain any pixel, it must not be
transferred.

Reported-by: Ivo Jager <ivo.jager@siliconfields.net>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
be2a9fae7be36864777e4b66f925d7af11578d99 04-Jun-2010 Jean-François Moine <moinejf@free.fr> V4L/DVB: gspca: Remove/move useless inclusions of slab.h

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9a731a3265a808c806766a28e2b62e9da78f9ac6 04-Jun-2010 Jean-François Moine <moinejf@free.fr> V4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header

The JPEG header is now included in the subdriver structure instead
of being allocated and freed at capture start and stop.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
6ea23bd0bbeeaf67bd57f2195d8d97af96072ea3 05-May-2010 Brian Johnson <brijohn@gmail.com> V4L/DVB: gspca - sn9c20x: Fix non working mt9v111 sensor

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
33ddc16f1003fc13d57ebe5061b29e16e6f84848 19-Apr-2010 Brian Johnson <brijohn@gmail.com> V4L/DVB: gspca - sn9c20x: HAS_BUTTON flag -> HAS_NO_BUTTON flag

Reverse HAS_BUTTON logic since most webcams either have a button or if
they don't don't bother to send any interrupts. However I have at least
one model that appears to leave the button GPIO floating and can send
a bogus interrupt.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
5d26ed9102404dec1b9ae3ea3ad3832fe6330f0f 10-Apr-2010 Brian Johnson <brijohn@gmail.com> V4L/DVB: gspca - sn9c20x: Add another MSI laptop to upsidedown device list

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e077f86bacb1795f2d434c6b3e6655769b5ce17c 06-Apr-2010 Brian Johnson <brijohn@gmail.com> V4L/DVB: gspca - sn9c20x: Add another laptop to upsidedown device list

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
cc2a833590e4bf4920383345cd61bc310ba84af0 16-Mar-2010 Brian Johnson <brijohn@gmail.com> V4L/DVB: gspca - sn9c20x: Fix bug with OV9655 code

Fixed buggy init sequence for the OV9655 sensor.
Tested with a 0c45:6288 and 0c45:62b3.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e99ac54da6d3e44e6152aaab693fa311279dec7c 16-Mar-2010 Brian Johnson <brijohn@gmail.com> V4L/DVB: gspca - sn9c20x: Add support for cameras using the MT9M112 sensor

Adds the following models:
- 0c45:624c
- 0c45:628c
- 0458:704a
- 0458:704c

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
7ddaac7fcb01eed38692f1bfa81f5f4348d848d7 16-Mar-2010 Brian Johnson <brijohn@gmail.com> V4L/DVB: gspca - sn9c20x: Add upside down detection

Add support for detecting webcams that are mounted
upside down in laptops. Currently the only two known
are two MSI modesl using the 0c45:624f.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
0c045eb752259d4176eabacbdf28a627644a071a 16-Mar-2010 Brian Johnson <brijohn@gmail.com> V4L/DVB: gspca - sn9c20x: Add support for camera LEDs

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
a39db27a08ef85ae37beab261744d8b38f21225c 18-May-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: gspca - sn9c20x: use gspca's input device handling

Drop custom code for handling the input button in
favor of using gspca's input hanlding mechinism.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e10f73194d63321d020433fa1287e619d4107b79 07-Mar-2010 German Galkin <galkinga@gmail.com> V4L/DVB: gspca - sn9c20x: Fix exposure control for HV7131R sensor

Make the range of exposure values (0-0x1770) distribute evenly through
HV7131R's exposure control bytes.

Signed-off-by: German Galkin <galkinga@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
a76b9f49ba58d081e373080ff75130673140d3f1 05-Feb-2010 Yong Zhang <yong.zhang0@gmail.com> V4L/DVB: gspca - sn9c20x: Correct onstack wait_queue_head declaration

Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
CC: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
de2d1549c2083e45ed84c779b64acf438ba5bf7f 19-Dec-2009 Jean-Francois Moine <moinejf@free.fr> V4L/DVB (13869): gspca - sn9c20x: Cleanup code.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
7e64dc4c4d6f5c8935fac25c7fc7aa83f9880ed7 30-Dec-2009 Marton Nemeth <nm127@freemail.hu> V4L/DVB (13899): gspca - all subdrivers: Make control descriptors constant.

The ctrls field of struct sd_desc is declared as const
in gspca.h. It is worth to initialize the content also with
constant values.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c60503c1db76bd46577cc7ff4fafa033b675e0e5 18-Dec-2009 Roel Kluin <roel.kluin@gmail.com> V4L/DVB (13868): gspca - sn9c20x: Fix test of unsigned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
83955556669f69fccfd332b52e9b1796d60c77bd 12-Dec-2009 Jean-Francois Moine <moinejf@free.fr> V4L/DVB (13626): gspca - many subdrivers: Fix some warnings.

- gl860.c:332:15: warning: cast to restricted __le16
- gl860.c:333:15: warning: cast to restricted __le16
- gl860-mi1320.c:348:5: warning: symbol 'mi1320_camera_settings' was not declared. Should it be static?
- gl860-mi2020.c:772:5: warning: symbol 'mi2020_camera_settings' was not declared. Should it be static?
- m5602_ov9650.c:444:7: warning: symbol 'data' shadows an earlier one
- m5602_core.c:84:5: warning: symbol 'm5602_wait_for_i2c' was not declared. Should it be static?
- m5602_core.c:391:6: warning: symbol 'm5602_disconnect' was not declared. Should it be static?
- m5602_s5k4aa.c:530:23: warning: dubious: x | !y
- m5602_s5k4aa.c:575:23: warning: dubious: x | !y
- gspca.c:1196:13: warning: potentially expensive pointer subtraction
- mr97310a.c:70:5: warning: symbol 'force_sensor_type' was not declared. Should it be static?
- ov519.c:2025:4: warning: do-while statement is not a compound statement
- ov519.c:2063:4: warning: do-while statement is not a compound statement
- ov519.c:2089:4: warning: do-while statement is not a compound statement
- ov519.c:1985:34: warning: incorrect type in assignment (different base types)
- sn9c20x.c:1164:5: warning: symbol 'i2c_r1' was not declared. Should it be static?
- sn9c20x.c:1189:5: warning: symbol 'i2c_r2' was not declared. Should it be static?
- sn9c20x.c:2237:27: warning: right shift by bigger than source value
- sn9c20x.c:2237:27: warning: right shift by bigger than source value

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
327ae59757f2e56fd3fc2b11acbd0a7c4070f4e8 27-Nov-2009 Laurent Pinchart <laurent.pinchart@ideasonboard.com> V4L/DVB (13557): v4l: Remove unneeded video_device::minor usage in drivers

The video_device::minor field is used where it shouldn't, either to

- test for error conditions that can't happen anymore with the current
v4l-dvb core,
- store the value in a driver private field that isn't used anymore,
- check the video device type where video_device::vfl_type should be
used, or
- create the name of a kernel thread that should get a stable name.

Remove or fix those use cases.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
76dd272b56cd1c7fa013ef5d7eb28c4d319e322b 13-Nov-2009 Jean-Francois Moine <moinejf@free.fr> V4L/DVB (13453): gspca - all subdrivers: Remove the unused frame ptr from pkt_scan().

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
4d708a5e9e5db74da28965fa00082d8c9323f523 04-Sep-2009 Brian Johnson <brijohn@gmail.com> V4L/DVB (12707): gspca - sn9c20x: Add SXGA support to MT9M111

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13a84fa4de7c050b27f14d39720f8b036cecde24 04-Sep-2009 Brian Johnson <brijohn@gmail.com> V4L/DVB (12706): gspca - sn9c20x: disable exposure/gain controls for MT9M111 sensors.

Using the MT9M111's IFP to handle exposure/gain gives better results.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e8b7acc18045afd52c801e196e6a04aefc252795 02-Sep-2009 Brian Johnson <brijohn@gmail.com> V4L/DVB (12705): gspca - sn9c20x: Add SXGA support to SOI968

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
58aa68c2fbdc3d025a3aff280935ede66dbcdc3e 02-Sep-2009 Joe Perches <joe@perches.com> V4L/DVB (12703): gspca - sn9c20x: Reduces size of object

Use s16 instead of int where possible.
Use struct instead of arrays

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
e14304712939133d58a5132501e80509658e0449 02-Sep-2009 Brian Johnson <brijohn@gmail.com> V4L/DVB (12704): gspca - sn9c20x: Fix exposure on SOI968 sensors

Fixes broken exposure on SOI968 webcams that was causing
the camera to display a black screen

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
00b581ef0d31db9c28215254b64f3890c7c9f939 23-Jul-2009 Brian Johnson <brijohn@gmail.com> V4L/DVB (12351): gspca - sn9c20x: Misc fixes

* use i2c_w instead of reg_w
* return error on failure
* read the correct number of bytes

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c15b95edb98f184e73f756511a60a7994cd9d840 19-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12286): sn9c20x: reorder includes to be like other drivers

This is not just pure cosmetic, since the order affects the out-of-tree
module build at the -hg development tree.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
26e744b6b61066203fd57de0d3962353621e06f8 19-Jul-2009 Brian Johnson <brijohn@gmail.com> V4L/DVB (12283): gspca - sn9c20x: New subdriver for sn9c201 and sn9c202 bridges.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>