diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-24 14:01:20 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-31 19:28:44 +0300 |
commit | bbdba43f202bcd724063524aef1436459af0e5ec (patch) | |
tree | 59f023323298c037b42cfe4b3a9eb1487f7e94af | |
parent | e7b3a2b22176d01db0c3b31d6389ccf542ba1967 (diff) | |
download | linux-bbdba43f202bcd724063524aef1436459af0e5ec.tar.xz |
[media] ivtv: prepare to convert to pr_foo()
Move the pr_fmt() macro to ivtv_driver.h and ensure that it
will be the first file to be included on all ivtv files.
While here, put the includes inside ivtv-driver.h on
alphabetic order.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-alsa-main.c | 15 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-alsa-mixer.c | 13 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-alsa-pcm.c | 15 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-driver.h | 39 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-mailbox.c | 4 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtvfb.c | 17 |
6 files changed, 42 insertions, 61 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-alsa-main.c b/drivers/media/pci/ivtv/ivtv-alsa-main.c index 5bd610a301ba..f57f3cc30c3f 100644 --- a/drivers/media/pci/ivtv/ivtv-alsa-main.c +++ b/drivers/media/pci/ivtv/ivtv-alsa-main.c @@ -17,24 +17,15 @@ * GNU General Public License for more details. */ -#include <linux/init.h> -#include <linux/slab.h> -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/device.h> -#include <linux/spinlock.h> - -#include <media/v4l2-device.h> - -#include <sound/core.h> -#include <sound/initval.h> - #include "ivtv-driver.h" #include "ivtv-version.h" #include "ivtv-alsa.h" #include "ivtv-alsa-mixer.h" #include "ivtv-alsa-pcm.h" +#include <sound/core.h> +#include <sound/initval.h> + int ivtv_alsa_debug; static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; diff --git a/drivers/media/pci/ivtv/ivtv-alsa-mixer.c b/drivers/media/pci/ivtv/ivtv-alsa-mixer.c index 847379cdaf05..ba372a23eb5c 100644 --- a/drivers/media/pci/ivtv/ivtv-alsa-mixer.c +++ b/drivers/media/pci/ivtv/ivtv-alsa-mixer.c @@ -15,21 +15,16 @@ * GNU General Public License for more details. */ -#include <linux/init.h> -#include <linux/kernel.h> -#include <linux/device.h> -#include <linux/spinlock.h> -#include <linux/videodev2.h> +#include "ivtv-alsa.h" +#include "ivtv-alsa-mixer.h" +#include "ivtv-driver.h" -#include <media/v4l2-device.h> +#include <linux/videodev2.h> #include <sound/core.h> #include <sound/control.h> #include <sound/tlv.h> -#include "ivtv-alsa.h" -#include "ivtv-driver.h" - /* * Note the cx25840-core volume scale is funny, due to the alignment of the * scale with another chip's range: diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c index 885cfddfc0f0..807ead20d212 100644 --- a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c +++ b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c @@ -18,15 +18,6 @@ * GNU General Public License for more details. */ -#include <linux/init.h> -#include <linux/kernel.h> -#include <linux/vmalloc.h> - -#include <media/v4l2-device.h> - -#include <sound/core.h> -#include <sound/pcm.h> - #include "ivtv-driver.h" #include "ivtv-queue.h" #include "ivtv-streams.h" @@ -34,6 +25,12 @@ #include "ivtv-alsa.h" #include "ivtv-alsa-pcm.h" +#include <linux/vmalloc.h> + +#include <sound/core.h> +#include <sound/pcm.h> + + static unsigned int pcm_debug; module_param(pcm_debug, int, 0644); MODULE_PARM_DESC(pcm_debug, "enable debug messages for pcm"); diff --git a/drivers/media/pci/ivtv/ivtv-driver.h b/drivers/media/pci/ivtv/ivtv-driver.h index 6b09a9514d64..1b23f9e47b8f 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.h +++ b/drivers/media/pci/ivtv/ivtv-driver.h @@ -22,6 +22,8 @@ #ifndef IVTV_DRIVER_H #define IVTV_DRIVER_H +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + /* Internal header for ivtv project: * Driver for the cx23415/6 chip. * Author: Kevin Thayer (nufan_wfk at yahoo.com) @@ -36,38 +38,39 @@ * using information provided by Jiun-Kuei Jung @ AVerMedia. */ -#include <linux/module.h> -#include <linux/init.h> +#include <asm/byteorder.h> #include <linux/delay.h> -#include <linux/sched.h> +#include <linux/device.h> +#include <linux/dvb/audio.h> +#include <linux/dvb/video.h> #include <linux/fs.h> -#include <linux/pci.h> -#include <linux/interrupt.h> -#include <linux/spinlock.h> #include <linux/i2c.h> #include <linux/i2c-algo-bit.h> +#include <linux/init.h> +#include <linux/interrupt.h> +#include <linux/ivtv.h> +#include <linux/kernel.h> +#include <linux/kthread.h> #include <linux/list.h> -#include <linux/unistd.h> +#include <linux/module.h> +#include <linux/mutex.h> #include <linux/pagemap.h> +#include <linux/pci.h> #include <linux/scatterlist.h> -#include <linux/kthread.h> -#include <linux/mutex.h> +#include <linux/sched.h> #include <linux/slab.h> +#include <linux/spinlock.h> #include <linux/uaccess.h> -#include <asm/byteorder.h> +#include <linux/unistd.h> -#include <linux/dvb/video.h> -#include <linux/dvb/audio.h> +#include <media/drv-intf/cx2341x.h> +#include <media/i2c/ir-kbd-i2c.h> +#include <media/tuner.h> #include <media/v4l2-common.h> -#include <media/v4l2-ioctl.h> #include <media/v4l2-ctrls.h> #include <media/v4l2-device.h> #include <media/v4l2-fh.h> -#include <media/tuner.h> -#include <media/drv-intf/cx2341x.h> -#include <media/i2c/ir-kbd-i2c.h> - -#include <linux/ivtv.h> +#include <media/v4l2-ioctl.h> /* Memory layout */ #define IVTV_ENCODER_OFFSET 0x00000000 diff --git a/drivers/media/pci/ivtv/ivtv-mailbox.c b/drivers/media/pci/ivtv/ivtv-mailbox.c index e3ce96763785..9a2506a5edbe 100644 --- a/drivers/media/pci/ivtv/ivtv-mailbox.c +++ b/drivers/media/pci/ivtv/ivtv-mailbox.c @@ -19,11 +19,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <stdarg.h> - #include "ivtv-driver.h" #include "ivtv-mailbox.h" +#include <stdarg.h> + /* Firmware mailbox flags*/ #define IVTV_MBOX_FIRMWARE_DONE 0x00000004 #define IVTV_MBOX_DRIVER_DONE 0x00000002 diff --git a/drivers/media/pci/ivtv/ivtvfb.c b/drivers/media/pci/ivtv/ivtvfb.c index 612a8402cf4d..b59b60d605eb 100644 --- a/drivers/media/pci/ivtv/ivtvfb.c +++ b/drivers/media/pci/ivtv/ivtvfb.c @@ -38,25 +38,20 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include "ivtv-driver.h" +#include "ivtv-cards.h" +#include "ivtv-i2c.h" +#include "ivtv-udma.h" +#include "ivtv-mailbox.h" +#include "ivtv-firmware.h" -#include <linux/module.h> -#include <linux/kernel.h> #include <linux/fb.h> #include <linux/ivtvfb.h> -#include <linux/slab.h> #ifdef CONFIG_X86_64 #include <asm/pat.h> #endif -#include "ivtv-driver.h" -#include "ivtv-cards.h" -#include "ivtv-i2c.h" -#include "ivtv-udma.h" -#include "ivtv-mailbox.h" -#include "ivtv-firmware.h" - /* card parameters */ static int ivtvfb_card_id = -1; static int ivtvfb_debug = 0; |