Re: [PATCH 1/2] media: pci: saa7164: remove unnecessary code
On Mon, Feb 20, 2017 at 09:46:58PM -0600, Gustavo A. R. Silva wrote: > Remove unnecessary variable 'loop'. > Reviewed-by: Peter Senna Tschudin <peter.se...@gmail.com> > Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> > --- > drivers/media/pci/saa7164/saa7164-cmd.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/media/pci/saa7164/saa7164-cmd.c > b/drivers/media/pci/saa7164/saa7164-cmd.c > index 45951b3..169c90a 100644 > --- a/drivers/media/pci/saa7164/saa7164-cmd.c > +++ b/drivers/media/pci/saa7164/saa7164-cmd.c > @@ -134,14 +134,13 @@ int saa7164_irq_dequeue(struct saa7164_dev *dev) > * -bus/c running buffer. */ > static int saa7164_cmd_dequeue(struct saa7164_dev *dev) > { > - int loop = 1; > int ret; > u32 timeout; > wait_queue_head_t *q = NULL; > u8 tmp[512]; > dprintk(DBGLVL_CMD, "%s()\n", __func__); > > - while (loop) { > + while (true) { > > struct tmComResInfo tRsp = { 0, 0, 0, 0, 0, 0 }; > ret = saa7164_bus_get(dev, , NULL, 1); > -- > 2.5.0 >
Re: [PATCH 2/2] media: pci: saa7164: remove dead code
On Mon, Feb 20, 2017 at 09:49:59PM -0600, Gustavo A. R. Silva wrote: > Remove dead code. The following line of code is never reached: > return SAA_OK; > > Addresses-Coverity-ID: 114283 Reviewed-by: Peter Senna Tschudin <peter.se...@gmail.com> > Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> > --- > drivers/media/pci/saa7164/saa7164-cmd.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/media/pci/saa7164/saa7164-cmd.c > b/drivers/media/pci/saa7164/saa7164-cmd.c > index 169c90a..fb19498 100644 > --- a/drivers/media/pci/saa7164/saa7164-cmd.c > +++ b/drivers/media/pci/saa7164/saa7164-cmd.c > @@ -181,8 +181,6 @@ static int saa7164_cmd_dequeue(struct saa7164_dev *dev) > wake_up(q); > return SAA_OK; > } > - > - return SAA_OK; > } > > static int saa7164_cmd_set(struct saa7164_dev *dev, struct tmComResInfo *msg, > -- > 2.5.0 >
[PATCH 9/11] drivers/media: Remove useless return variables
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // smpl @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret when strict return - ret + C ; // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/ngene/ngene-core.c | 11 ++- drivers/media/usb/cx231xx/cx231xx-video.c | 11 +-- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c index 970e833..d8435a5 100644 --- a/drivers/media/pci/ngene/ngene-core.c +++ b/drivers/media/pci/ngene/ngene-core.c @@ -910,7 +910,6 @@ static int AllocateRingBuffers(struct pci_dev *pci_dev, { dma_addr_t tmp; u32 i, j; - int status = 0; u32 SCListMemSize = pRingBuffer-NumBuffers * ((Buffer2Length != 0) ? (NUM_SCATTER_GATHER_ENTRIES * 2) : NUM_SCATTER_GATHER_ENTRIES) @@ -1010,18 +1009,12 @@ static int AllocateRingBuffers(struct pci_dev *pci_dev, } - return status; + return 0; } static int FillTSIdleBuffer(struct SRingBufferDescriptor *pIdleBuffer, struct SRingBufferDescriptor *pRingBuffer) { - int status = 0; - - /* Copy pointer to scatter gather list in TSRingbuffer - structure for buffer 2 - Load number of buffer - */ u32 n = pRingBuffer-NumBuffers; /* Point to first buffer entry */ @@ -1038,7 +1031,7 @@ static int FillTSIdleBuffer(struct SRingBufferDescriptor *pIdleBuffer, pIdleBuffer-Head-ngeneBuffer.Number_of_entries_1; Cur = Cur-Next; } - return status; + return 0; } static u32 RingBufferSizes[MAX_STREAM] = { diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 1f87513..cba7fea 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c @@ -208,7 +208,7 @@ static inline void get_next_buf(struct cx231xx_dmaqueue *dma_q, static inline int cx231xx_isoc_copy(struct cx231xx *dev, struct urb *urb) { struct cx231xx_dmaqueue *dma_q = urb-context; - int i, rc = 1; + int i; unsigned char *p_buffer; u32 bytes_parsed = 0, buffer_size = 0; u8 sav_eav = 0; @@ -299,13 +299,12 @@ static inline int cx231xx_isoc_copy(struct cx231xx *dev, struct urb *urb) bytes_parsed = 0; } - return rc; + return 1; } static inline int cx231xx_bulk_copy(struct cx231xx *dev, struct urb *urb) { struct cx231xx_dmaqueue *dma_q = urb-context; - int rc = 1; unsigned char *p_buffer; u32 bytes_parsed = 0, buffer_size = 0; u8 sav_eav = 0; @@ -379,7 +378,7 @@ static inline int cx231xx_bulk_copy(struct cx231xx *dev, struct urb *urb) bytes_parsed = 0; } - return rc; + return 1; } @@ -1620,7 +1619,7 @@ static int radio_s_tuner(struct file *file, void *priv, const struct v4l2_tuner */ static int cx231xx_v4l2_open(struct file *filp) { - int errCode = 0, radio = 0; + int radio = 0; struct video_device *vdev = video_devdata(filp); struct cx231xx *dev = video_drvdata(filp); struct cx231xx_fh *fh; @@ -1718,7 +1717,7 @@ static int cx231xx_v4l2_open(struct file *filp) mutex_unlock(dev-lock); v4l2_fh_add(fh-fh); - return errCode; + return 0; } /* -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 8/11] drivers/media/usb/usbvision/usbvision-core.c: Remove useless return variables
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // smpl @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret when strict return - ret + C ; // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/usbvision/usbvision-core.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/media/usb/usbvision/usbvision-core.c b/drivers/media/usb/usbvision/usbvision-core.c index 816b1cf..302aa07 100644 --- a/drivers/media/usb/usbvision/usbvision-core.c +++ b/drivers/media/usb/usbvision/usbvision-core.c @@ -1463,8 +1463,6 @@ static int usbvision_write_reg_irq(struct usb_usbvision *usbvision, int address, static int usbvision_init_compression(struct usb_usbvision *usbvision) { - int err_code = 0; - usbvision-last_isoc_frame_num = -1; usbvision-isoc_data_count = 0; usbvision-isoc_packet_count = 0; @@ -1475,7 +1473,7 @@ static int usbvision_init_compression(struct usb_usbvision *usbvision) usbvision-request_intra = 1; usbvision-isoc_measure_bandwidth_count = 0; - return err_code; + return 0; } /* this function measures the used bandwidth since last call @@ -1484,11 +1482,9 @@ static int usbvision_init_compression(struct usb_usbvision *usbvision) */ static int usbvision_measure_bandwidth(struct usb_usbvision *usbvision) { - int err_code = 0; - if (usbvision-isoc_measure_bandwidth_count 2) { /* this gives an average bandwidth of 3 frames */ usbvision-isoc_measure_bandwidth_count++; - return err_code; + return 0; } if ((usbvision-isoc_packet_size 0) (usbvision-isoc_packet_count 0)) { usbvision-used_bandwidth = usbvision-isoc_data_count / @@ -1499,7 +1495,7 @@ static int usbvision_measure_bandwidth(struct usb_usbvision *usbvision) usbvision-isoc_data_count = 0; usbvision-isoc_packet_count = 0; usbvision-isoc_skip_count = 0; - return err_code; + return 0; } static int usbvision_adjust_compression(struct usb_usbvision *usbvision) @@ -1546,26 +1542,24 @@ static int usbvision_adjust_compression(struct usb_usbvision *usbvision) static int usbvision_request_intra(struct usb_usbvision *usbvision) { - int err_code = 0; unsigned char buffer[1]; PDEBUG(DBG_IRQ, ); usbvision-request_intra = 1; buffer[0] = 1; usbvision_write_reg_irq(usbvision, USBVISION_FORCE_INTRA, buffer, 1); - return err_code; + return 0; } static int usbvision_unrequest_intra(struct usb_usbvision *usbvision) { - int err_code = 0; unsigned char buffer[1]; PDEBUG(DBG_IRQ, ); usbvision-request_intra = 0; buffer[0] = 0; usbvision_write_reg_irq(usbvision, USBVISION_FORCE_INTRA, buffer, 1); - return err_code; + return 0; } /*** -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 9/11 V2] drivers/media: Remove useless return variables
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // smpl @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret when strict return - ret + C ; // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: - Do not remove comment after the definition of return variable drivers/media/pci/ngene/ngene-core.c | 11 ++- drivers/media/usb/cx231xx/cx231xx-video.c | 11 +-- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c index 970e833..826228c 100644 --- a/drivers/media/pci/ngene/ngene-core.c +++ b/drivers/media/pci/ngene/ngene-core.c @@ -910,7 +910,6 @@ static int AllocateRingBuffers(struct pci_dev *pci_dev, { dma_addr_t tmp; u32 i, j; - int status = 0; u32 SCListMemSize = pRingBuffer-NumBuffers * ((Buffer2Length != 0) ? (NUM_SCATTER_GATHER_ENTRIES * 2) : NUM_SCATTER_GATHER_ENTRIES) @@ -1010,14 +1009,12 @@ static int AllocateRingBuffers(struct pci_dev *pci_dev, } - return status; + return 0; } static int FillTSIdleBuffer(struct SRingBufferDescriptor *pIdleBuffer, struct SRingBufferDescriptor *pRingBuffer) { - int status = 0; - /* Copy pointer to scatter gather list in TSRingbuffer structure for buffer 2 Load number of buffer @@ -1038,7 +1035,7 @@ static int FillTSIdleBuffer(struct SRingBufferDescriptor *pIdleBuffer, pIdleBuffer-Head-ngeneBuffer.Number_of_entries_1; Cur = Cur-Next; } - return status; + return 0; } static u32 RingBufferSizes[MAX_STREAM] = { diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 1f87513..cba7fea 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c @@ -208,7 +208,7 @@ static inline void get_next_buf(struct cx231xx_dmaqueue *dma_q, static inline int cx231xx_isoc_copy(struct cx231xx *dev, struct urb *urb) { struct cx231xx_dmaqueue *dma_q = urb-context; - int i, rc = 1; + int i; unsigned char *p_buffer; u32 bytes_parsed = 0, buffer_size = 0; u8 sav_eav = 0; @@ -299,13 +299,12 @@ static inline int cx231xx_isoc_copy(struct cx231xx *dev, struct urb *urb) bytes_parsed = 0; } - return rc; + return 1; } static inline int cx231xx_bulk_copy(struct cx231xx *dev, struct urb *urb) { struct cx231xx_dmaqueue *dma_q = urb-context; - int rc = 1; unsigned char *p_buffer; u32 bytes_parsed = 0, buffer_size = 0; u8 sav_eav = 0; @@ -379,7 +378,7 @@ static inline int cx231xx_bulk_copy(struct cx231xx *dev, struct urb *urb) bytes_parsed = 0; } - return rc; + return 1; } @@ -1620,7 +1619,7 @@ static int radio_s_tuner(struct file *file, void *priv, const struct v4l2_tuner */ static int cx231xx_v4l2_open(struct file *filp) { - int errCode = 0, radio = 0; + int radio = 0; struct video_device *vdev = video_devdata(filp); struct cx231xx *dev = video_drvdata(filp); struct cx231xx_fh *fh; @@ -1718,7 +1717,7 @@ static int cx231xx_v4l2_open(struct file *filp) mutex_unlock(dev-lock); v4l2_fh_add(fh-fh); - return errCode; + return 0; } /* -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/8] USB: as102_usb_drv.c: Remove useless return variables
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // smpl @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret - return ret; + return C; // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/staging/media/as102/as102_usb_drv.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/as102/as102_usb_drv.c b/drivers/staging/media/as102/as102_usb_drv.c index e4a6945..e6f6278 100644 --- a/drivers/staging/media/as102/as102_usb_drv.c +++ b/drivers/staging/media/as102/as102_usb_drv.c @@ -249,7 +249,7 @@ static void as102_free_usb_stream_buffer(struct as102_dev_t *dev) static int as102_alloc_usb_stream_buffer(struct as102_dev_t *dev) { - int i, ret = 0; + int i; dev-stream = usb_alloc_coherent(dev-bus_adap.usb_dev, MAX_STREAM_URB * AS102_USB_BUF_SIZE, @@ -280,7 +280,7 @@ static int as102_alloc_usb_stream_buffer(struct as102_dev_t *dev) dev-stream_urb[i] = urb; } - return ret; + return 0; } static void as102_usb_stop_stream(struct as102_dev_t *dev) @@ -458,7 +458,6 @@ exit: static int as102_release(struct inode *inode, struct file *file) { - int ret = 0; struct as102_dev_t *dev = NULL; dev = file-private_data; @@ -467,7 +466,7 @@ static int as102_release(struct inode *inode, struct file *file) kref_put(dev-kref, as102_usb_release); } - return ret; + return 0; } MODULE_DEVICE_TABLE(usb, as102_usb_id_table); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Fwd: cx23885-dvb.c:undefined reference to `tda18271_attach'
Hi, I'm being blamed for some bugs for more than one year, and this weekend I was able to reproduce the error for the first time. I have the impression that the issue is related to Kconfig because when compiling the Kernel for x86(not x86_64), and when: CONFIG_VIDEO_CX23885=y and CONFIG_MEDIA_TUNER_TDA18271=m the build fails as the tuner code was compiled as a module when it should have been compiled as part of the Kernel. On the Kconfig file drivers/media/pci/cx23885/Kconfig: config VIDEO_CX23885 tristate Conexant cx23885 (2388x successor) support ... select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT which I think is the problem. Can I just remove this 'if MEDIA_SUBDRV_AUTOSELECT'? Or what is the correct way of telling Kconfig to set CONFIG_MEDIA_TUNER_TDA18271 based on the value of CONFIG_VIDEO_CX23885? There are at least 6 similar cases which I'm willing to send patches. Thank you, Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: A list of Linux drivers
Check the file: drivers/media/tuners/Kconfig On Thu, Dec 26, 2013 at 12:03 PM, Jahn jana1...@centrum.cz wrote: Is there available a list of tuners that are supported in Linux ( those that have a driver) preferably in MIPS Linux ? Thanks -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Submitting kernel module device driver
On Tue, Oct 15, 2013 at 4:56 AM, Буди Романто b...@are.ma wrote: Hello I've developed a DVB device driver for Earthsoft PT3 (PCIE) card want to ask where/how to submit it. Usually drivers are sent in a list of incremental patches, but this is not a rule. After sending the first version, there should be reviews and comments on the patches. There are some general information at: http://linuxtv.org/wiki/index.php/Development:_Submitting_Drivers And one example: http://lwn.net/Articles/500201/ Thanks for your help -Bud -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 06/19] media: Change variable type to bool
The variable frame_ready is only assigned the values true and false. Change its type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ - T + bool b = ...; ... when any b = \(true\|false\) Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- This fails at checkpatch due initializing static variable to false. I haven't changed the assignment. drivers/media/usb/cpia2/cpia2_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/cpia2/cpia2_usb.c b/drivers/media/usb/cpia2/cpia2_usb.c index be17192..351a78a 100644 --- a/drivers/media/usb/cpia2/cpia2_usb.c +++ b/drivers/media/usb/cpia2/cpia2_usb.c @@ -209,7 +209,7 @@ static void cpia2_usb_complete(struct urb *urb) { int i; unsigned char *cdata; - static int frame_ready = false; + static bool frame_ready = false; struct camera_data *cam = (struct camera_data *) urb-context; if (urb-status!=0) { -- 1.8.3.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 05/19] media: Change variable type to bool
The variable vco_select is only assigned the values true and false. Change its type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ - T + bool b = ...; ... when any b = \(true\|false\) Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/tuners/fc0012.c | 2 +- drivers/media/tuners/fc0013.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/tuners/fc0012.c b/drivers/media/tuners/fc0012.c index f4d0e79..d74e920 100644 --- a/drivers/media/tuners/fc0012.c +++ b/drivers/media/tuners/fc0012.c @@ -139,7 +139,7 @@ static int fc0012_set_params(struct dvb_frontend *fe) unsigned char reg[7], am, pm, multi, tmp; unsigned long f_vco; unsigned short xtal_freq_khz_2, xin, xdiv; - int vco_select = false; + bool vco_select = false; if (fe-callback) { ret = fe-callback(priv-i2c, DVB_FRONTEND_COMPONENT_TUNER, diff --git a/drivers/media/tuners/fc0013.c b/drivers/media/tuners/fc0013.c index bd8f0f1..b416231 100644 --- a/drivers/media/tuners/fc0013.c +++ b/drivers/media/tuners/fc0013.c @@ -233,7 +233,7 @@ static int fc0013_set_params(struct dvb_frontend *fe) unsigned char reg[7], am, pm, multi, tmp; unsigned long f_vco; unsigned short xtal_freq_khz_2, xin, xdiv; - int vco_select = false; + bool vco_select = false; if (fe-callback) { ret = fe-callback(priv-i2c, DVB_FRONTEND_COMPONENT_TUNER, -- 1.8.3.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Dependency bug in the uvcvideo Kconfig
Hi Randy, I've tried to download the .config file from the link on the forum, but it tries to install something in my browser and the file is not downloadable for me. Can you provide it over an simpler interface such as pastebin.com? Thanks On Wed, Sep 18, 2013 at 4:59 PM, Randy Dunlap rdun...@infradead.org wrote: [adding linux-media mailing list] On 09/18/13 06:18, Jeff P. Zacher wrote: Not subscribed, please CC'me in replies: There seems to be a dependency bug in the Kconfig for the uvcvideo kernel module. If uvcvideo is built in and usb support is built as a module, the kernel build will fail with the obviously missing dependanies. Error logs: * ERROR: Failed to compile the bzImage target... * * -- Grepping log... -- * * SHIPPED scripts/genksyms/keywords.hash.c * SHIPPED scripts/genksyms/parse.tab.h * SHIPPED scripts/genksyms/parse.tab.c * HOSTCC scripts/genksyms/lex.lex.o *scripts/genksyms/lex.lex.c_shipped: In function ‘yylex1’: *scripts/genksyms/lex.lex.c_shipped:904:1: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result [-Wunused-result] *-- * CC drivers/video/console/font_8x16.o * CC drivers/video/console/softcursor.o * CC sound/core/seq/seq_memory.o * CC drivers/video/console/fbcondecor.o * CC sound/core/seq/seq_queue.o *drivers/video/console/fbcondecor.c:511:6: warning: function declaration isn’t a prototype [-Wstrict-prototypes] *-- *(.text+0xf8fb1): undefined reference to `usb_submit_urb' *drivers/built-in.o: In function `uvc_init': *uvc_driver.c:(.init.text+0x908a): undefined reference to `usb_register_driver' *drivers/built-in.o: In function `uvc_cleanup': *uvc_driver.c:(.exit.text+0x67e): undefined reference to `usb_deregister' *make: *** [vmlinux] Error 1 *-- * Running with options: --lvm --menuconfig all * Using genkernel.conf from /etc/genkernel.conf * Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh .. * Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load .. * * ERROR: Failed to compile the bzImage target... * * -- End log... -- Compiling uvc as a module allows the compilation to complete. Platform x86_64 Ref: http://forums.gentoo.org/viewtopic-p-7398782.html#7398782 -- Jeff P. Zacher ad_si...@yahoo.com -- ~Randy -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [media-workshop] Linux Media mini-summit in Edinburgh
Hi Mauro, I'll love to join the media mini-summit. Thanks, Peter On Sat, Aug 31, 2013 at 4:29 PM, Sakari Ailus sakari.ai...@iki.fi wrote: Hi Mauro, On Fri, Aug 30, 2013 at 08:39:23AM -0300, Mauro Carvalho Chehab wrote: Hi media developers, This year, we're planning to do a media mini-summit together with the conferences that will be hosted in Edinburgh (LinuxCon EU/ELCE/KS/...), at the Oct 21-25 week. We don't have the specific days for the event yet (we're still closing it with Linux Foundation). Yet, I'd like to know who is interested on participate on the event, and ask for the theme proposals for the discussions. As we're doing over the last years, we'll be using the media-works...@linuxtv.org mailing list for such discussions. I'm very interested in having a media mini-summit in Edinburgh. I'll be there. -- Cheers, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk ___ media-workshop mailing list media-works...@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/media-workshop -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Are there any high fps camera available?
Any one know any linux-media compatible camera capable of recording at 480 fps or more? -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: vivi kernel driver
Check some patches from Kirill Smelkov like: https://patchwork.kernel.org/patch/1688591/ On Tue, Apr 9, 2013 at 9:58 AM, Michal Lazo michal.l...@mdragon.org wrote: I want to make API that will provide hw video decoder on Amlogic SOC it is ARM cortex 9 with some proprietary video decoder amlogic provide me with working example that generate output frames in amlvideo driver. It is v4l2 driver and it did memcpy to mmap userspace memory buffer_y_start=ioremap(cs0.addr,cs0.width*cs0.height); for(i=0;ibuf-vb.height;i++) { memcpy(vbuf + pos_dst, buffer_y_start+pos_src, buf-vb.width*3); pos_dst+=buf-vb.width*3; pos_src+= cs0.width; } I did it with one memcpy with same cpu load https://github.com/Pivosgroup/buildroot-linux-kernel/blob/master/drivers/media/video/amlvideo/amlvideo.c#L218 top get me 50% cpu load on this driver for 25fps PAL it is really too much and funny is that vivi driver(amlvideo is completely base on vivi) get me same cpu load it looks like memcpy isn't cached or something but I don't know how to identify problem Any idea how to identify this problem. On Mon, Apr 8, 2013 at 2:46 PM, Hans Verkuil hverk...@xs4all.nl wrote: On Mon April 8 2013 14:42:32 Michal Lazo wrote: Hi 720x576 RGB 25, 30 fps and it take 25% cpu load on raspberry pi(ARM 700Mhz linux 3.6.11) or 8% on x86(AMD 2GHz linux 3.2.0-39) it is simply too much No, that's what I would expect. Note that vivi was substantially improved recently when it comes to the image generation. That will be in the upcoming 3.9 kernel. This should reduce CPU load by quite a bit if memory serves. Regards, Hans On Mon, Apr 8, 2013 at 9:42 AM, Peter Senna Tschudin peter.se...@gmail.com wrote: Dear Michal, The CPU intensive part of the vivi driver is the image generation. This is not an issue for real drivers. Regards, Peter On Sun, Apr 7, 2013 at 9:32 PM, Michal Lazo michal.l...@mdragon.org wrote: Hi V4L2 driver vivi generate 25% cpu load on raspberry pi(linux 3.6.11) or 8% on x86(linux 3.2.0-39) player GST_DEBUG=*:3,v4l2src:3,v4l2:3 gst-launch-0.10 v4l2src device=/dev/video0 norm=255 ! video/x-raw-rgb, width=720, height=576, framerate=3/1001 ! fakesink sync=false Anybody can answer me why? And how can I do it better ? I use vivi as base example for my driver -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Peter -- Best Regards Michal Lazo Senior developer manager mdragon.org Slovakia -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: vivi kernel driver
Dear Michal, The CPU intensive part of the vivi driver is the image generation. This is not an issue for real drivers. Regards, Peter On Sun, Apr 7, 2013 at 9:32 PM, Michal Lazo michal.l...@mdragon.org wrote: Hi V4L2 driver vivi generate 25% cpu load on raspberry pi(linux 3.6.11) or 8% on x86(linux 3.2.0-39) player GST_DEBUG=*:3,v4l2src:3,v4l2:3 gst-launch-0.10 v4l2src device=/dev/video0 norm=255 ! video/x-raw-rgb, width=720, height=576, framerate=3/1001 ! fakesink sync=false Anybody can answer me why? And how can I do it better ? I use vivi as base example for my driver -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 01/24] use IS_ENABLED() macro
On Mon, Jan 21, 2013 at 10:47 AM, Hans de Goede hdego...@redhat.com wrote: Hi, Thanks for the patches I'll pick up 5 - 21 and add them to my tree for Mauro. I have sent V2 of this patches with another subject and with fixed commit message for two patches. Regards, Hans On 01/19/2013 05:33 PM, Peter Senna Tschudin wrote: replace: #if defined(CONFIG_VIDEO_CX88_DVB) || \ defined(CONFIG_VIDEO_CX88_DVB_MODULE) with: #if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) This change was made for: CONFIG_VIDEO_CX88_DVB, CONFIG_VIDEO_CX88_BLACKBIRD, CONFIG_VIDEO_CX88_VP3054 Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/cx88/cx88.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h index ba0dba4..feff53c 100644 --- a/drivers/media/pci/cx88/cx88.h +++ b/drivers/media/pci/cx88/cx88.h @@ -363,7 +363,7 @@ struct cx88_core { unsigned int tuner_formats; /* config info -- dvb */ -#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) int(*prev_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage); #endif void (*gate_ctrl)(struct cx88_core *core, int open); @@ -562,8 +562,7 @@ struct cx8802_dev { /* for blackbird only */ struct list_head devlist; -#if defined(CONFIG_VIDEO_CX88_BLACKBIRD) || \ -defined(CONFIG_VIDEO_CX88_BLACKBIRD_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_BLACKBIRD) struct video_device*mpeg_dev; u32mailbox; intwidth; @@ -574,13 +573,12 @@ struct cx8802_dev { struct cx2341x_handler cxhdl; #endif -#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) /* for dvb only */ struct videobuf_dvb_frontends frontends; #endif -#if defined(CONFIG_VIDEO_CX88_VP3054) || \ -defined(CONFIG_VIDEO_CX88_VP3054_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_VP3054) /* For VP3045 secondary I2C bus support */ struct vp3054_i2c_state*vp3054; #endif -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 01/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_VIDEO_CX88_DVB) || \ defined(CONFIG_VIDEO_CX88_DVB_MODULE) with: #if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) This change was made for: CONFIG_VIDEO_CX88_DVB, CONFIG_VIDEO_CX88_BLACKBIRD, CONFIG_VIDEO_CX88_VP3054 Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/cx88/cx88.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h index ba0dba4..feff53c 100644 --- a/drivers/media/pci/cx88/cx88.h +++ b/drivers/media/pci/cx88/cx88.h @@ -363,7 +363,7 @@ struct cx88_core { unsigned int tuner_formats; /* config info -- dvb */ -#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) int(*prev_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage); #endif void (*gate_ctrl)(struct cx88_core *core, int open); @@ -562,8 +562,7 @@ struct cx8802_dev { /* for blackbird only */ struct list_head devlist; -#if defined(CONFIG_VIDEO_CX88_BLACKBIRD) || \ -defined(CONFIG_VIDEO_CX88_BLACKBIRD_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_BLACKBIRD) struct video_device*mpeg_dev; u32mailbox; intwidth; @@ -574,13 +573,12 @@ struct cx8802_dev { struct cx2341x_handler cxhdl; #endif -#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) /* for dvb only */ struct videobuf_dvb_frontends frontends; #endif -#if defined(CONFIG_VIDEO_CX88_VP3054) || \ -defined(CONFIG_VIDEO_CX88_VP3054_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_VP3054) /* For VP3045 secondary I2C bus support */ struct vp3054_i2c_state*vp3054; #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 02/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_VIDEO_SAA7134_DVB) || \ defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) with: #if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) This change was made for: CONFIG_VIDEO_SAA7134_DVB Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/saa7134/saa7134.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h index 0a3feaa..ace44fd 100644 --- a/drivers/media/pci/saa7134/saa7134.h +++ b/drivers/media/pci/saa7134/saa7134.h @@ -42,7 +42,7 @@ #include media/videobuf-dma-sg.h #include sound/core.h #include sound/pcm.h -#if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) #include media/videobuf-dvb.h #endif @@ -644,7 +644,7 @@ struct saa7134_dev { struct work_struct empress_workqueue; intempress_started; -#if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) /* SAA7134_MPEG_DVB only */ struct videobuf_dvb_frontends frontends; int (*original_demod_sleep)(struct dvb_frontend *fe); -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 03/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT_EVDEV) || \ defined(CONFIG_INPUT_EVDEV_MODULE) with: #if IS_ENABLED(CONFIG_INPUT_EVDEV) This change was made for: CONFIG_INPUT_EVDEV, CONFIG_DVB_SP8870 Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/ttpci/av7110.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c index 2f54e2b..fc9e7e5 100644 --- a/drivers/media/pci/ttpci/av7110.c +++ b/drivers/media/pci/ttpci/av7110.c @@ -235,7 +235,7 @@ static void recover_arm(struct av7110 *av7110) restart_feeds(av7110); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_check_ir_config(av7110, true); #endif } @@ -268,7 +268,7 @@ static int arm_thread(void *data) if (!av7110-arm_ready) continue; -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_check_ir_config(av7110, false); #endif @@ -1730,7 +1730,7 @@ static int alps_tdlb7_tuner_set_params(struct dvb_frontend *fe) static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) { -#if defined(CONFIG_DVB_SP8870) || defined(CONFIG_DVB_SP8870_MODULE) +#if IS_ENABLED(CONFIG_DVB_SP8870) struct av7110* av7110 = fe-dvb-priv; return request_firmware(fw, name, av7110-dev-pci-dev); @@ -2725,7 +2725,7 @@ static int __devinit av7110_attach(struct saa7146_dev* dev, mutex_init(av7110-ioctl_mutex); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_ir_init(av7110); #endif printk(KERN_INFO dvb-ttpci: found av7110-%d.\n, av7110_num); @@ -2768,7 +2768,7 @@ static int __devexit av7110_detach(struct saa7146_dev* saa) struct av7110 *av7110 = saa-ext_priv; dprintk(4, %p\n, av7110); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_ir_exit(av7110); #endif if (budgetpatch || av7110-full_ts) { -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 04/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_VIDEOBUF2_VMALLOC) || \ defined(CONFIG_VIDEOBUF2_VMALLOC_MODULE) with: #if IS_ENABLED(CONFIG_VIDEOBUF2_VMALLOC) This change was made for: CONFIG_VIDEOBUF2_VMALLOC, CONFIG_VIDEOBUF2_DMA_CONTIG, CONFIG_VIDEOBUF2_DMA_SG Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/platform/marvell-ccic/mcam-core.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/marvell-ccic/mcam-core.h b/drivers/media/platform/marvell-ccic/mcam-core.h index 5e802c6..6c53ac9 100644 --- a/drivers/media/platform/marvell-ccic/mcam-core.h +++ b/drivers/media/platform/marvell-ccic/mcam-core.h @@ -15,15 +15,15 @@ * Create our own symbols for the supported buffer modes, but, for now, * base them entirely on which videobuf2 options have been selected. */ -#if defined(CONFIG_VIDEOBUF2_VMALLOC) || defined(CONFIG_VIDEOBUF2_VMALLOC_MODULE) +#if IS_ENABLED(CONFIG_VIDEOBUF2_VMALLOC) #define MCAM_MODE_VMALLOC 1 #endif -#if defined(CONFIG_VIDEOBUF2_DMA_CONTIG) || defined(CONFIG_VIDEOBUF2_DMA_CONTIG_MODULE) +#if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_CONTIG) #define MCAM_MODE_DMA_CONTIG 1 #endif -#if defined(CONFIG_VIDEOBUF2_DMA_SG) || defined(CONFIG_VIDEOBUF2_DMA_SG_MODULE) +#if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_SG) #define MCAM_MODE_DMA_SG 1 #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 05/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_USB_SI470X) || \ defined(CONFIG_USB_SI470X_MODULE) with: #if IS_ENABLED(CONFIG_USB_SI470X) This change was made for: CONFIG_USB_SI470X, CONFIG_I2C_SI470X Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/radio/si470x/radio-si470x.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h index 2f089b4..467e955 100644 --- a/drivers/media/radio/si470x/radio-si470x.h +++ b/drivers/media/radio/si470x/radio-si470x.h @@ -163,7 +163,7 @@ struct si470x_device { struct completion completion; bool status_rssi_auto_update; /* Does RSSI get updated automatic? */ -#if defined(CONFIG_USB_SI470X) || defined(CONFIG_USB_SI470X_MODULE) +#if IS_ENABLED(CONFIG_USB_SI470X) /* reference to USB and video device */ struct usb_device *usbdev; struct usb_interface *intf; @@ -179,7 +179,7 @@ struct si470x_device { unsigned char hardware_version; #endif -#if defined(CONFIG_I2C_SI470X) || defined(CONFIG_I2C_SI470X_MODULE) +#if IS_ENABLED(CONFIG_I2C_SI470X) struct i2c_client *client; #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 06/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/cpia1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c index b3ba47d..1dcdd9f 100644 --- a/drivers/media/usb/gspca/cpia1.c +++ b/drivers/media/usb/gspca/cpia1.c @@ -541,7 +541,7 @@ static int do_command(struct gspca_dev *gspca_dev, u16 command, /* test button press */ a = ((gspca_dev-usb_buf[1] 0x02) == 0); if (a != sd-params.qx3.button) { -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) input_report_key(gspca_dev-input_dev, KEY_CAMERA, a); input_sync(gspca_dev-input_dev); #endif @@ -1640,7 +1640,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) /* Update the camera status */ do_command(gspca_dev, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* If the last button state is pressed, release it now! */ if (sd-params.qx3.button) { /* The camera latch will hold the pressed state until we reset @@ -1869,7 +1869,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .dq_callback = sd_dq_callback, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 07/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/gspca.c | 10 +- drivers/media/usb/gspca/gspca.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index e0a431b..3564bdb 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c @@ -44,7 +44,7 @@ #include gspca.h -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) #include linux/input.h #include linux/usb/input.h #endif @@ -118,7 +118,7 @@ static const struct vm_operations_struct gspca_vm_ops = { /* * Input and interrupt endpoint handling functions */ -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static void int_irq(struct urb *urb) { struct gspca_dev *gspca_dev = (struct gspca_dev *) urb-context; @@ -2303,7 +2303,7 @@ int gspca_dev_probe2(struct usb_interface *intf, return 0; out: -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) if (gspca_dev-input_dev) input_unregister_device(gspca_dev-input_dev); #endif @@ -2348,7 +2348,7 @@ EXPORT_SYMBOL(gspca_dev_probe); void gspca_disconnect(struct usb_interface *intf) { struct gspca_dev *gspca_dev = usb_get_intfdata(intf); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) struct input_dev *input_dev; #endif @@ -2360,7 +2360,7 @@ void gspca_disconnect(struct usb_interface *intf) gspca_dev-present = 0; destroy_urbs(gspca_dev); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) gspca_input_destroy_urb(gspca_dev); input_dev = gspca_dev-input_dev; if (input_dev) { diff --git a/drivers/media/usb/gspca/gspca.h b/drivers/media/usb/gspca/gspca.h index 352317d..5559932 100644 --- a/drivers/media/usb/gspca/gspca.h +++ b/drivers/media/usb/gspca/gspca.h @@ -138,7 +138,7 @@ struct sd_desc { cam_reg_op get_register; #endif cam_ident_op get_chip_ident; -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) cam_int_pkt_op int_pkt_scan; /* other_input makes the gspca core create gspca_dev-input even when int_pkt_scan is NULL, for cams with non interrupt driven buttons */ @@ -167,7 +167,7 @@ struct gspca_dev { struct usb_device *dev; struct file *capt_file; /* file doing video capture */ /* protected by queue_lock */ -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) struct input_dev *input_dev; char phys[64]; /* physical device path */ #endif @@ -190,7 +190,7 @@ struct gspca_dev { #define USB_BUF_SZ 64 __u8 *usb_buf; /* buffer for USB exchanges */ struct urb *urb[MAX_NURBS]; -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) struct urb *int_urb; #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 08/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/konica.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/konica.c b/drivers/media/usb/gspca/konica.c index bbf91e0..61e25db 100644 --- a/drivers/media/usb/gspca/konica.c +++ b/drivers/media/usb/gspca/konica.c @@ -246,7 +246,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) struct sd *sd = (struct sd *) gspca_dev; konica_stream_off(gspca_dev); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* Don't keep the button in the pressed state forever if it was pressed when streaming is stopped */ if (sd-snapshot_pressed) { @@ -345,7 +345,7 @@ static void sd_isoc_irq(struct urb *urb) gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); gspca_frame_add(gspca_dev, FIRST_PACKET, NULL, 0); } else { -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) u8 button_state = st 0x40 ? 1 : 0; if (sd-snapshot_pressed != button_state) { input_report_key(gspca_dev-input_dev, @@ -452,7 +452,7 @@ static const struct sd_desc sd_desc = { .init_controls = sd_init_controls, .start = sd_start, .stopN = sd_stopN, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 09/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/ov519.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/ov519.c b/drivers/media/usb/gspca/ov519.c index 9aa09f8..9ad19a7 100644 --- a/drivers/media/usb/gspca/ov519.c +++ b/drivers/media/usb/gspca/ov519.c @@ -4238,7 +4238,7 @@ static void sd_stop0(struct gspca_dev *gspca_dev) if (sd-bridge == BRIDGE_W9968CF) w9968cf_stop0(sd); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* If the last button state is pressed, release it now! */ if (sd-snapshot_pressed) { input_report_key(gspca_dev-input_dev, KEY_CAMERA, 0); @@ -4255,7 +4255,7 @@ static void ov51x_handle_button(struct gspca_dev *gspca_dev, u8 state) struct sd *sd = (struct sd *) gspca_dev; if (sd-snapshot_pressed != state) { -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) input_report_key(gspca_dev-input_dev, KEY_CAMERA, state); input_sync(gspca_dev-input_dev); #endif @@ -4924,7 +4924,7 @@ static const struct sd_desc sd_desc = { .dq_callback = sd_reset_snapshot, .get_jcomp = sd_get_jcomp, .set_jcomp = sd_set_jcomp, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 10/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/pac207.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/pac207.c b/drivers/media/usb/gspca/pac207.c index 1f253df..3b75097 100644 --- a/drivers/media/usb/gspca/pac207.c +++ b/drivers/media/usb/gspca/pac207.c @@ -413,7 +413,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, gspca_frame_add(gspca_dev, INTER_PACKET, data, len); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrput packet length */ @@ -442,7 +442,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .dq_callback = pac207_do_auto_gain, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 11/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/pac7302.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/pac7302.c b/drivers/media/usb/gspca/pac7302.c index 4f5869a..add6f72 100644 --- a/drivers/media/usb/gspca/pac7302.c +++ b/drivers/media/usb/gspca/pac7302.c @@ -890,7 +890,7 @@ static int sd_chip_ident(struct gspca_dev *gspca_dev, } #endif -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrput packet length */ @@ -936,7 +936,7 @@ static const struct sd_desc sd_desc = { .set_register = sd_dbg_s_register, .get_chip_ident = sd_chip_ident, #endif -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 12/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/pac7311.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/pac7311.c b/drivers/media/usb/gspca/pac7311.c index ba3558d..a12dfbf 100644 --- a/drivers/media/usb/gspca/pac7311.c +++ b/drivers/media/usb/gspca/pac7311.c @@ -621,7 +621,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, gspca_frame_add(gspca_dev, INTER_PACKET, data, len); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrupt packet length */ @@ -661,7 +661,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .pkt_scan = sd_pkt_scan, .dq_callback = do_autogain, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 14/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/sn9c20x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c index 41f769f..4ec544f 100644 --- a/drivers/media/usb/gspca/sn9c20x.c +++ b/drivers/media/usb/gspca/sn9c20x.c @@ -2205,7 +2205,7 @@ static void qual_upd(struct work_struct *work) mutex_unlock(gspca_dev-usb_lock); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet */ int len)/* interrupt packet length */ @@ -2349,7 +2349,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .stop0 = sd_stop0, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif .dq_callback = sd_dqcallback, -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 16/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/sonixj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/sonixj.c b/drivers/media/usb/gspca/sonixj.c index 36307a9..671d0c6 100644 --- a/drivers/media/usb/gspca/sonixj.c +++ b/drivers/media/usb/gspca/sonixj.c @@ -3077,7 +3077,7 @@ static int sd_querymenu(struct gspca_dev *gspca_dev, return -EINVAL; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrupt packet length */ @@ -3109,7 +3109,7 @@ static const struct sd_desc sd_desc = { .pkt_scan = sd_pkt_scan, .dq_callback = do_autogain, .querymenu = sd_querymenu, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 17/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/spca561.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/spca561.c b/drivers/media/usb/gspca/spca561.c index cfe71dd..d1db3d8 100644 --- a/drivers/media/usb/gspca/spca561.c +++ b/drivers/media/usb/gspca/spca561.c @@ -741,7 +741,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, return; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) if (data[0] 0x20) { input_report_key(gspca_dev-input_dev, KEY_CAMERA, 1); input_sync(gspca_dev-input_dev); @@ -866,7 +866,7 @@ static const struct sd_desc sd_desc_12a = { .start = sd_start_12a, .stopN = sd_stopN, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; @@ -879,7 +879,7 @@ static const struct sd_desc sd_desc_72a = { .stopN = sd_stopN, .pkt_scan = sd_pkt_scan, .dq_callback = do_autogain, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 18/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/stv06xx/stv06xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx.c b/drivers/media/usb/gspca/stv06xx/stv06xx.c index 999ec77..657160b 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx.c +++ b/drivers/media/usb/gspca/stv06xx/stv06xx.c @@ -492,7 +492,7 @@ frame_data: } } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrupt packet length */ @@ -529,7 +529,7 @@ static const struct sd_desc sd_desc = { .pkt_scan = stv06xx_pkt_scan, .isoc_init = stv06xx_isoc_init, .isoc_nego = stv06xx_isoc_nego, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 19/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/t613.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/t613.c b/drivers/media/usb/gspca/t613.c index b92d4ef..e2cc4e5 100644 --- a/drivers/media/usb/gspca/t613.c +++ b/drivers/media/usb/gspca/t613.c @@ -823,7 +823,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) msleep(20); reg_w(gspca_dev, 0x0309); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* If the last button state is pressed, release it now! */ if (sd-button_pressed) { input_report_key(gspca_dev-input_dev, KEY_CAMERA, 0); @@ -841,7 +841,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, int pkt_type; if (data[0] == 0x5a) { -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) if (len 20) { u8 state = (data[20] 0x80) ? 1 : 0; if (sd-button_pressed != state) { @@ -1019,7 +1019,7 @@ static const struct sd_desc sd_desc = { .start = sd_start, .stopN = sd_stopN, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 20/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/xirlink_cit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/gspca/xirlink_cit.c b/drivers/media/usb/gspca/xirlink_cit.c index d4b23c9..7eaf64e 100644 --- a/drivers/media/usb/gspca/xirlink_cit.c +++ b/drivers/media/usb/gspca/xirlink_cit.c @@ -2759,7 +2759,7 @@ static void sd_stop0(struct gspca_dev *gspca_dev) break; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* If the last button state is pressed, release it now! */ if (sd-button_state) { input_report_key(gspca_dev-input_dev, KEY_CAMERA, 0); @@ -2914,7 +2914,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, gspca_frame_add(gspca_dev, INTER_PACKET, data, len); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static void cit_check_button(struct gspca_dev *gspca_dev) { int new_button_state; @@ -3062,7 +3062,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .stop0 = sd_stop0, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .dq_callback = cit_check_button, .other_input = 1, #endif @@ -3079,7 +3079,7 @@ static const struct sd_desc sd_desc_isoc_nego = { .stopN = sd_stopN, .stop0 = sd_stop0, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .dq_callback = cit_check_button, .other_input = 1, #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 21/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/zc3xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/zc3xx.c b/drivers/media/usb/gspca/zc3xx.c index 77c5775..a8dc421 100644 --- a/drivers/media/usb/gspca/zc3xx.c +++ b/drivers/media/usb/gspca/zc3xx.c @@ -6902,7 +6902,7 @@ static int sd_get_jcomp(struct gspca_dev *gspca_dev, return 0; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrput packet length */ @@ -6929,7 +6929,7 @@ static const struct sd_desc sd_desc = { .pkt_scan = sd_pkt_scan, .get_jcomp = sd_get_jcomp, .set_jcomp = sd_set_jcomp, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 22/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_I2C) || \ defined(CONFIG_I2C_MODULE) with: #if IS_ENABLED(CONFIG_I2C) This change was made for: CONFIG_I2C Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/hdpvr/hdpvr-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c index 84dc26f..5c61935 100644 --- a/drivers/media/usb/hdpvr/hdpvr-core.c +++ b/drivers/media/usb/hdpvr/hdpvr-core.c @@ -391,7 +391,7 @@ static int hdpvr_probe(struct usb_interface *interface, goto error; } -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) +#if IS_ENABLED(CONFIG_I2C) retval = hdpvr_register_i2c_adapter(dev); if (retval 0) { v4l2_err(dev-v4l2_dev, i2c adapter register failed\n); @@ -419,7 +419,7 @@ static int hdpvr_probe(struct usb_interface *interface, return 0; reg_fail: -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) +#if IS_ENABLED(CONFIG_I2C) i2c_del_adapter(dev-i2c_adapter); #endif error: @@ -451,7 +451,7 @@ static void hdpvr_disconnect(struct usb_interface *interface) mutex_lock(dev-io_mutex); hdpvr_cancel_queue(dev); mutex_unlock(dev-io_mutex); -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) +#if IS_ENABLED(CONFIG_I2C) i2c_del_adapter(dev-i2c_adapter); #endif video_unregister_device(dev-video_dev); -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 23/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_I2C) || \ defined(CONFIG_I2C_MODULE) with: #if IS_ENABLED(CONFIG_I2C) This change was made for: CONFIG_I2C Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/hdpvr/hdpvr-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/hdpvr/hdpvr-i2c.c b/drivers/media/usb/hdpvr/hdpvr-i2c.c index 6c5054f..a38f58c 100644 --- a/drivers/media/usb/hdpvr/hdpvr-i2c.c +++ b/drivers/media/usb/hdpvr/hdpvr-i2c.c @@ -13,7 +13,7 @@ * */ -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) +#if IS_ENABLED(CONFIG_I2C) #include linux/i2c.h #include linux/slab.h -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 24/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_MEDIA_TUNER_TEA5761) || \ defined(CONFIG_MEDIA_TUNER_TEA5761_MODULE) with: #if IS_ENABLED(CONFIG_MEDIA_TUNER_TEA5761) This change was made for: CONFIG_MEDIA_TUNER_TEA5761 Also replaced: with: Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/v4l2-core/v4l2-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c index 614316f..aa044f4 100644 --- a/drivers/media/v4l2-core/v4l2-common.c +++ b/drivers/media/v4l2-core/v4l2-common.c @@ -238,7 +238,7 @@ int v4l2_chip_match_host(const struct v4l2_dbg_match *match) } EXPORT_SYMBOL(v4l2_chip_match_host); -#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) defined(MODULE)) +#if IS_ENABLED(CONFIG_I2C) int v4l2_chip_match_i2c_client(struct i2c_client *c, const struct v4l2_dbg_match *match) { int len; @@ -384,7 +384,7 @@ EXPORT_SYMBOL_GPL(v4l2_i2c_subdev_addr); const unsigned short *v4l2_i2c_tuner_addrs(enum v4l2_i2c_tuner_type type) { static const unsigned short radio_addrs[] = { -#if defined(CONFIG_MEDIA_TUNER_TEA5761) || defined(CONFIG_MEDIA_TUNER_TEA5761_MODULE) +#if IS_ENABLED(CONFIG_MEDIA_TUNER_TEA5761) 0x10, #endif 0x60, -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 13/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/se401.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/se401.c b/drivers/media/usb/gspca/se401.c index a33cb78..5f729b8 100644 --- a/drivers/media/usb/gspca/se401.c +++ b/drivers/media/usb/gspca/se401.c @@ -594,7 +594,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, int len) sd_pkt_scan_janggu(gspca_dev, data, len); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, int len) { struct sd *sd = (struct sd *)gspca_dev; @@ -688,7 +688,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .dq_callback = sd_dq_callback, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 15/24] use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Also replaced: with: Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/usb/gspca/sonixb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/sonixb.c b/drivers/media/usb/gspca/sonixb.c index 1220340..104ae25 100644 --- a/drivers/media/usb/gspca/sonixb.c +++ b/drivers/media/usb/gspca/sonixb.c @@ -1400,7 +1400,7 @@ static int sd_querymenu(struct gspca_dev *gspca_dev, return -EINVAL; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrupt packet length */ @@ -1430,7 +1430,7 @@ static const struct sd_desc sd_desc = { .pkt_scan = sd_pkt_scan, .querymenu = sd_querymenu, .dq_callback = do_autogain, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; @@ -1448,7 +1448,7 @@ static const struct usb_device_id device_table[] = { {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)}, {USB_DEVICE(0x0c45, 0x6011), SB(OV6650, 101)}, {USB_DEVICE(0x0c45, 0x6019), SB(OV7630, 101)}, -#if !defined CONFIG_USB_SN9C102 !defined CONFIG_USB_SN9C102_MODULE +#if !IS_ENABLED(CONFIG_USB_SN9C102) {USB_DEVICE(0x0c45, 0x6024), SB(TAS5130CXX, 102)}, {USB_DEVICE(0x0c45, 0x6025), SB(TAS5130CXX, 102)}, #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 00/24] [media] use IS_ENABLED() macro
This patch series introduce the use of IS_ENABLED() macro. For example replace: #if defined(CONFIG_VIDEO_CX88_DVB) || \ defined(CONFIG_VIDEO_CX88_DVB_MODULE) with: #if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) Changes from V1: Updated subject Fixed commit message of patch 15/24 Fixed commit message of patch 24/24 Peter Senna Tschudin (24): pci/cx88/cx88.h: use IS_ENABLED() macro pci/saa7134/saa7134.h: use IS_ENABLED() macro pci/ttpci/av7110.c: use IS_ENABLED() macro platform/marvell-ccic/mcam-core.h: use IS_ENABLED() macro radio/si470x/radio-si470x.h: use IS_ENABLED() macro usb/gspca/cpia1.c: use IS_ENABLED() macro usb/gspca: use IS_ENABLED() macro usb/gspca/konica.c: use IS_ENABLED() macro usb/gspca/ov519.c: use IS_ENABLED() macro usb/gspca/pac207.c: use IS_ENABLED() macro gspca/pac7302.c: use IS_ENABLED() macro usb/gspca/pac7311.c: use IS_ENABLED() macro usb/gspca/se401.c: use IS_ENABLED() macro usb/gspca/sn9c20x.c: use IS_ENABLED() macro usb/gspca/sonixb.c: use IS_ENABLED() macro usb/gspca/sonixj.c: use IS_ENABLED() macro usb/gspca/spca561.c: use IS_ENABLED() macro usb/gspca/stv06xx/stv06xx.c: use IS_ENABLED() macro usb/gspca/t613.c: use IS_ENABLED() macro usb/gspca/xirlink_cit.c: use IS_ENABLED() macro usb/gspca/zc3xx.c: use IS_ENABLED() macro usb/hdpvr/hdpvr-core.c: use IS_ENABLED() macro usb/hdpvr/hdpvr-i2c.c: use IS_ENABLED() macro v4l2-core/v4l2-common.c: use IS_ENABLED() macro drivers/media/pci/cx88/cx88.h | 10 -- drivers/media/pci/saa7134/saa7134.h | 4 ++-- drivers/media/pci/ttpci/av7110.c| 10 +- drivers/media/platform/marvell-ccic/mcam-core.h | 6 +++--- drivers/media/radio/si470x/radio-si470x.h | 4 ++-- drivers/media/usb/gspca/cpia1.c | 6 +++--- drivers/media/usb/gspca/gspca.c | 10 +- drivers/media/usb/gspca/gspca.h | 6 +++--- drivers/media/usb/gspca/konica.c| 6 +++--- drivers/media/usb/gspca/ov519.c | 6 +++--- drivers/media/usb/gspca/pac207.c| 4 ++-- drivers/media/usb/gspca/pac7302.c | 4 ++-- drivers/media/usb/gspca/pac7311.c | 4 ++-- drivers/media/usb/gspca/se401.c | 4 ++-- drivers/media/usb/gspca/sn9c20x.c | 4 ++-- drivers/media/usb/gspca/sonixb.c| 6 +++--- drivers/media/usb/gspca/sonixj.c| 4 ++-- drivers/media/usb/gspca/spca561.c | 6 +++--- drivers/media/usb/gspca/stv06xx/stv06xx.c | 4 ++-- drivers/media/usb/gspca/t613.c | 6 +++--- drivers/media/usb/gspca/xirlink_cit.c | 8 drivers/media/usb/gspca/zc3xx.c | 4 ++-- drivers/media/usb/hdpvr/hdpvr-core.c| 6 +++--- drivers/media/usb/hdpvr/hdpvr-i2c.c | 2 +- drivers/media/v4l2-core/v4l2-common.c | 4 ++-- 25 files changed, 68 insertions(+), 70 deletions(-) -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 01/24] pci/cx88/cx88.h: use IS_ENABLED() macro
replace: #if defined(CONFIG_VIDEO_CX88_DVB) || \ defined(CONFIG_VIDEO_CX88_DVB_MODULE) with: #if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) This change was made for: CONFIG_VIDEO_CX88_DVB, CONFIG_VIDEO_CX88_BLACKBIRD, CONFIG_VIDEO_CX88_VP3054 Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/pci/cx88/cx88.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h index ba0dba4..feff53c 100644 --- a/drivers/media/pci/cx88/cx88.h +++ b/drivers/media/pci/cx88/cx88.h @@ -363,7 +363,7 @@ struct cx88_core { unsigned int tuner_formats; /* config info -- dvb */ -#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) int(*prev_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage); #endif void (*gate_ctrl)(struct cx88_core *core, int open); @@ -562,8 +562,7 @@ struct cx8802_dev { /* for blackbird only */ struct list_head devlist; -#if defined(CONFIG_VIDEO_CX88_BLACKBIRD) || \ -defined(CONFIG_VIDEO_CX88_BLACKBIRD_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_BLACKBIRD) struct video_device*mpeg_dev; u32mailbox; intwidth; @@ -574,13 +573,12 @@ struct cx8802_dev { struct cx2341x_handler cxhdl; #endif -#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) /* for dvb only */ struct videobuf_dvb_frontends frontends; #endif -#if defined(CONFIG_VIDEO_CX88_VP3054) || \ -defined(CONFIG_VIDEO_CX88_VP3054_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_VP3054) /* For VP3045 secondary I2C bus support */ struct vp3054_i2c_state*vp3054; #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 02/24] pci/saa7134/saa7134.h: use IS_ENABLED() macro
replace: #if defined(CONFIG_VIDEO_SAA7134_DVB) || \ defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) with: #if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) This change was made for: CONFIG_VIDEO_SAA7134_DVB Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/pci/saa7134/saa7134.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h index 0a3feaa..ace44fd 100644 --- a/drivers/media/pci/saa7134/saa7134.h +++ b/drivers/media/pci/saa7134/saa7134.h @@ -42,7 +42,7 @@ #include media/videobuf-dma-sg.h #include sound/core.h #include sound/pcm.h -#if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) #include media/videobuf-dvb.h #endif @@ -644,7 +644,7 @@ struct saa7134_dev { struct work_struct empress_workqueue; intempress_started; -#if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) /* SAA7134_MPEG_DVB only */ struct videobuf_dvb_frontends frontends; int (*original_demod_sleep)(struct dvb_frontend *fe); -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 03/24] pci/ttpci/av7110.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT_EVDEV) || \ defined(CONFIG_INPUT_EVDEV_MODULE) with: #if IS_ENABLED(CONFIG_INPUT_EVDEV) This change was made for: CONFIG_INPUT_EVDEV, CONFIG_DVB_SP8870 Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/pci/ttpci/av7110.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c index 2f54e2b..fc9e7e5 100644 --- a/drivers/media/pci/ttpci/av7110.c +++ b/drivers/media/pci/ttpci/av7110.c @@ -235,7 +235,7 @@ static void recover_arm(struct av7110 *av7110) restart_feeds(av7110); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_check_ir_config(av7110, true); #endif } @@ -268,7 +268,7 @@ static int arm_thread(void *data) if (!av7110-arm_ready) continue; -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_check_ir_config(av7110, false); #endif @@ -1730,7 +1730,7 @@ static int alps_tdlb7_tuner_set_params(struct dvb_frontend *fe) static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) { -#if defined(CONFIG_DVB_SP8870) || defined(CONFIG_DVB_SP8870_MODULE) +#if IS_ENABLED(CONFIG_DVB_SP8870) struct av7110* av7110 = fe-dvb-priv; return request_firmware(fw, name, av7110-dev-pci-dev); @@ -2725,7 +2725,7 @@ static int __devinit av7110_attach(struct saa7146_dev* dev, mutex_init(av7110-ioctl_mutex); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_ir_init(av7110); #endif printk(KERN_INFO dvb-ttpci: found av7110-%d.\n, av7110_num); @@ -2768,7 +2768,7 @@ static int __devexit av7110_detach(struct saa7146_dev* saa) struct av7110 *av7110 = saa-ext_priv; dprintk(4, %p\n, av7110); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_ir_exit(av7110); #endif if (budgetpatch || av7110-full_ts) { -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 04/24] platform/marvell-ccic/mcam-core.h: use IS_ENABLED() macro
replace: #if defined(CONFIG_VIDEOBUF2_VMALLOC) || \ defined(CONFIG_VIDEOBUF2_VMALLOC_MODULE) with: #if IS_ENABLED(CONFIG_VIDEOBUF2_VMALLOC) This change was made for: CONFIG_VIDEOBUF2_VMALLOC, CONFIG_VIDEOBUF2_DMA_CONTIG, CONFIG_VIDEOBUF2_DMA_SG Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/platform/marvell-ccic/mcam-core.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/marvell-ccic/mcam-core.h b/drivers/media/platform/marvell-ccic/mcam-core.h index 5e802c6..6c53ac9 100644 --- a/drivers/media/platform/marvell-ccic/mcam-core.h +++ b/drivers/media/platform/marvell-ccic/mcam-core.h @@ -15,15 +15,15 @@ * Create our own symbols for the supported buffer modes, but, for now, * base them entirely on which videobuf2 options have been selected. */ -#if defined(CONFIG_VIDEOBUF2_VMALLOC) || defined(CONFIG_VIDEOBUF2_VMALLOC_MODULE) +#if IS_ENABLED(CONFIG_VIDEOBUF2_VMALLOC) #define MCAM_MODE_VMALLOC 1 #endif -#if defined(CONFIG_VIDEOBUF2_DMA_CONTIG) || defined(CONFIG_VIDEOBUF2_DMA_CONTIG_MODULE) +#if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_CONTIG) #define MCAM_MODE_DMA_CONTIG 1 #endif -#if defined(CONFIG_VIDEOBUF2_DMA_SG) || defined(CONFIG_VIDEOBUF2_DMA_SG_MODULE) +#if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_SG) #define MCAM_MODE_DMA_SG 1 #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 05/24] radio/si470x/radio-si470x.h: use IS_ENABLED() macro
replace: #if defined(CONFIG_USB_SI470X) || \ defined(CONFIG_USB_SI470X_MODULE) with: #if IS_ENABLED(CONFIG_USB_SI470X) This change was made for: CONFIG_USB_SI470X, CONFIG_I2C_SI470X Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/radio/si470x/radio-si470x.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h index 2f089b4..467e955 100644 --- a/drivers/media/radio/si470x/radio-si470x.h +++ b/drivers/media/radio/si470x/radio-si470x.h @@ -163,7 +163,7 @@ struct si470x_device { struct completion completion; bool status_rssi_auto_update; /* Does RSSI get updated automatic? */ -#if defined(CONFIG_USB_SI470X) || defined(CONFIG_USB_SI470X_MODULE) +#if IS_ENABLED(CONFIG_USB_SI470X) /* reference to USB and video device */ struct usb_device *usbdev; struct usb_interface *intf; @@ -179,7 +179,7 @@ struct si470x_device { unsigned char hardware_version; #endif -#if defined(CONFIG_I2C_SI470X) || defined(CONFIG_I2C_SI470X_MODULE) +#if IS_ENABLED(CONFIG_I2C_SI470X) struct i2c_client *client; #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 06/24] usb/gspca/cpia1.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/cpia1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c index b3ba47d..1dcdd9f 100644 --- a/drivers/media/usb/gspca/cpia1.c +++ b/drivers/media/usb/gspca/cpia1.c @@ -541,7 +541,7 @@ static int do_command(struct gspca_dev *gspca_dev, u16 command, /* test button press */ a = ((gspca_dev-usb_buf[1] 0x02) == 0); if (a != sd-params.qx3.button) { -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) input_report_key(gspca_dev-input_dev, KEY_CAMERA, a); input_sync(gspca_dev-input_dev); #endif @@ -1640,7 +1640,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) /* Update the camera status */ do_command(gspca_dev, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* If the last button state is pressed, release it now! */ if (sd-params.qx3.button) { /* The camera latch will hold the pressed state until we reset @@ -1869,7 +1869,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .dq_callback = sd_dq_callback, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 07/24] usb/gspca: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/gspca.c | 10 +- drivers/media/usb/gspca/gspca.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index e0a431b..3564bdb 100644 --- a/drivers/media/usb/gspca/gspca.c +++ b/drivers/media/usb/gspca/gspca.c @@ -44,7 +44,7 @@ #include gspca.h -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) #include linux/input.h #include linux/usb/input.h #endif @@ -118,7 +118,7 @@ static const struct vm_operations_struct gspca_vm_ops = { /* * Input and interrupt endpoint handling functions */ -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static void int_irq(struct urb *urb) { struct gspca_dev *gspca_dev = (struct gspca_dev *) urb-context; @@ -2303,7 +2303,7 @@ int gspca_dev_probe2(struct usb_interface *intf, return 0; out: -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) if (gspca_dev-input_dev) input_unregister_device(gspca_dev-input_dev); #endif @@ -2348,7 +2348,7 @@ EXPORT_SYMBOL(gspca_dev_probe); void gspca_disconnect(struct usb_interface *intf) { struct gspca_dev *gspca_dev = usb_get_intfdata(intf); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) struct input_dev *input_dev; #endif @@ -2360,7 +2360,7 @@ void gspca_disconnect(struct usb_interface *intf) gspca_dev-present = 0; destroy_urbs(gspca_dev); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) gspca_input_destroy_urb(gspca_dev); input_dev = gspca_dev-input_dev; if (input_dev) { diff --git a/drivers/media/usb/gspca/gspca.h b/drivers/media/usb/gspca/gspca.h index 352317d..5559932 100644 --- a/drivers/media/usb/gspca/gspca.h +++ b/drivers/media/usb/gspca/gspca.h @@ -138,7 +138,7 @@ struct sd_desc { cam_reg_op get_register; #endif cam_ident_op get_chip_ident; -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) cam_int_pkt_op int_pkt_scan; /* other_input makes the gspca core create gspca_dev-input even when int_pkt_scan is NULL, for cams with non interrupt driven buttons */ @@ -167,7 +167,7 @@ struct gspca_dev { struct usb_device *dev; struct file *capt_file; /* file doing video capture */ /* protected by queue_lock */ -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) struct input_dev *input_dev; char phys[64]; /* physical device path */ #endif @@ -190,7 +190,7 @@ struct gspca_dev { #define USB_BUF_SZ 64 __u8 *usb_buf; /* buffer for USB exchanges */ struct urb *urb[MAX_NURBS]; -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) struct urb *int_urb; #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 08/24] usb/gspca/konica.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/konica.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/konica.c b/drivers/media/usb/gspca/konica.c index bbf91e0..61e25db 100644 --- a/drivers/media/usb/gspca/konica.c +++ b/drivers/media/usb/gspca/konica.c @@ -246,7 +246,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) struct sd *sd = (struct sd *) gspca_dev; konica_stream_off(gspca_dev); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* Don't keep the button in the pressed state forever if it was pressed when streaming is stopped */ if (sd-snapshot_pressed) { @@ -345,7 +345,7 @@ static void sd_isoc_irq(struct urb *urb) gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); gspca_frame_add(gspca_dev, FIRST_PACKET, NULL, 0); } else { -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) u8 button_state = st 0x40 ? 1 : 0; if (sd-snapshot_pressed != button_state) { input_report_key(gspca_dev-input_dev, @@ -452,7 +452,7 @@ static const struct sd_desc sd_desc = { .init_controls = sd_init_controls, .start = sd_start, .stopN = sd_stopN, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 09/24] usb/gspca/ov519.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/ov519.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/ov519.c b/drivers/media/usb/gspca/ov519.c index 9aa09f8..9ad19a7 100644 --- a/drivers/media/usb/gspca/ov519.c +++ b/drivers/media/usb/gspca/ov519.c @@ -4238,7 +4238,7 @@ static void sd_stop0(struct gspca_dev *gspca_dev) if (sd-bridge == BRIDGE_W9968CF) w9968cf_stop0(sd); -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* If the last button state is pressed, release it now! */ if (sd-snapshot_pressed) { input_report_key(gspca_dev-input_dev, KEY_CAMERA, 0); @@ -4255,7 +4255,7 @@ static void ov51x_handle_button(struct gspca_dev *gspca_dev, u8 state) struct sd *sd = (struct sd *) gspca_dev; if (sd-snapshot_pressed != state) { -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) input_report_key(gspca_dev-input_dev, KEY_CAMERA, state); input_sync(gspca_dev-input_dev); #endif @@ -4924,7 +4924,7 @@ static const struct sd_desc sd_desc = { .dq_callback = sd_reset_snapshot, .get_jcomp = sd_get_jcomp, .set_jcomp = sd_set_jcomp, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 10/24] usb/gspca/pac207.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/pac207.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/pac207.c b/drivers/media/usb/gspca/pac207.c index 1f253df..3b75097 100644 --- a/drivers/media/usb/gspca/pac207.c +++ b/drivers/media/usb/gspca/pac207.c @@ -413,7 +413,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, gspca_frame_add(gspca_dev, INTER_PACKET, data, len); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrput packet length */ @@ -442,7 +442,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .dq_callback = pac207_do_auto_gain, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 11/24] gspca/pac7302.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/pac7302.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/pac7302.c b/drivers/media/usb/gspca/pac7302.c index 4f5869a..add6f72 100644 --- a/drivers/media/usb/gspca/pac7302.c +++ b/drivers/media/usb/gspca/pac7302.c @@ -890,7 +890,7 @@ static int sd_chip_ident(struct gspca_dev *gspca_dev, } #endif -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrput packet length */ @@ -936,7 +936,7 @@ static const struct sd_desc sd_desc = { .set_register = sd_dbg_s_register, .get_chip_ident = sd_chip_ident, #endif -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 12/24] usb/gspca/pac7311.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/pac7311.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/pac7311.c b/drivers/media/usb/gspca/pac7311.c index ba3558d..a12dfbf 100644 --- a/drivers/media/usb/gspca/pac7311.c +++ b/drivers/media/usb/gspca/pac7311.c @@ -621,7 +621,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, gspca_frame_add(gspca_dev, INTER_PACKET, data, len); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrupt packet length */ @@ -661,7 +661,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .pkt_scan = sd_pkt_scan, .dq_callback = do_autogain, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 13/24] usb/gspca/se401.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/se401.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/se401.c b/drivers/media/usb/gspca/se401.c index a33cb78..5f729b8 100644 --- a/drivers/media/usb/gspca/se401.c +++ b/drivers/media/usb/gspca/se401.c @@ -594,7 +594,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, int len) sd_pkt_scan_janggu(gspca_dev, data, len); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, int len) { struct sd *sd = (struct sd *)gspca_dev; @@ -688,7 +688,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .dq_callback = sd_dq_callback, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 15/24] usb/gspca/sonixb.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Also replaced: #if !defined CONFIG_USB_SN9C102 !defined CONFIG_USB_SN9C102_MODULE with: #if !IS_ENABLED(CONFIG_USB_SN9C102) Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject Fixed commit message drivers/media/usb/gspca/sonixb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/sonixb.c b/drivers/media/usb/gspca/sonixb.c index 1220340..104ae25 100644 --- a/drivers/media/usb/gspca/sonixb.c +++ b/drivers/media/usb/gspca/sonixb.c @@ -1400,7 +1400,7 @@ static int sd_querymenu(struct gspca_dev *gspca_dev, return -EINVAL; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrupt packet length */ @@ -1430,7 +1430,7 @@ static const struct sd_desc sd_desc = { .pkt_scan = sd_pkt_scan, .querymenu = sd_querymenu, .dq_callback = do_autogain, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; @@ -1448,7 +1448,7 @@ static const struct usb_device_id device_table[] = { {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)}, {USB_DEVICE(0x0c45, 0x6011), SB(OV6650, 101)}, {USB_DEVICE(0x0c45, 0x6019), SB(OV7630, 101)}, -#if !defined CONFIG_USB_SN9C102 !defined CONFIG_USB_SN9C102_MODULE +#if !IS_ENABLED(CONFIG_USB_SN9C102) {USB_DEVICE(0x0c45, 0x6024), SB(TAS5130CXX, 102)}, {USB_DEVICE(0x0c45, 0x6025), SB(TAS5130CXX, 102)}, #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 16/24] usb/gspca/sonixj.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/sonixj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/sonixj.c b/drivers/media/usb/gspca/sonixj.c index 36307a9..671d0c6 100644 --- a/drivers/media/usb/gspca/sonixj.c +++ b/drivers/media/usb/gspca/sonixj.c @@ -3077,7 +3077,7 @@ static int sd_querymenu(struct gspca_dev *gspca_dev, return -EINVAL; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrupt packet length */ @@ -3109,7 +3109,7 @@ static const struct sd_desc sd_desc = { .pkt_scan = sd_pkt_scan, .dq_callback = do_autogain, .querymenu = sd_querymenu, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 17/24] usb/gspca/spca561.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/spca561.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/spca561.c b/drivers/media/usb/gspca/spca561.c index cfe71dd..d1db3d8 100644 --- a/drivers/media/usb/gspca/spca561.c +++ b/drivers/media/usb/gspca/spca561.c @@ -741,7 +741,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, return; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) if (data[0] 0x20) { input_report_key(gspca_dev-input_dev, KEY_CAMERA, 1); input_sync(gspca_dev-input_dev); @@ -866,7 +866,7 @@ static const struct sd_desc sd_desc_12a = { .start = sd_start_12a, .stopN = sd_stopN, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; @@ -879,7 +879,7 @@ static const struct sd_desc sd_desc_72a = { .stopN = sd_stopN, .pkt_scan = sd_pkt_scan, .dq_callback = do_autogain, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 19/24] usb/gspca/t613.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/t613.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/t613.c b/drivers/media/usb/gspca/t613.c index b92d4ef..e2cc4e5 100644 --- a/drivers/media/usb/gspca/t613.c +++ b/drivers/media/usb/gspca/t613.c @@ -823,7 +823,7 @@ static void sd_stopN(struct gspca_dev *gspca_dev) msleep(20); reg_w(gspca_dev, 0x0309); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* If the last button state is pressed, release it now! */ if (sd-button_pressed) { input_report_key(gspca_dev-input_dev, KEY_CAMERA, 0); @@ -841,7 +841,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, int pkt_type; if (data[0] == 0x5a) { -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) if (len 20) { u8 state = (data[20] 0x80) ? 1 : 0; if (sd-button_pressed != state) { @@ -1019,7 +1019,7 @@ static const struct sd_desc sd_desc = { .start = sd_start, .stopN = sd_stopN, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .other_input = 1, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 18/24] usb/gspca/stv06xx/stv06xx.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/stv06xx/stv06xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx.c b/drivers/media/usb/gspca/stv06xx/stv06xx.c index 999ec77..657160b 100644 --- a/drivers/media/usb/gspca/stv06xx/stv06xx.c +++ b/drivers/media/usb/gspca/stv06xx/stv06xx.c @@ -492,7 +492,7 @@ frame_data: } } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrupt packet length */ @@ -529,7 +529,7 @@ static const struct sd_desc sd_desc = { .pkt_scan = stv06xx_pkt_scan, .isoc_init = stv06xx_isoc_init, .isoc_nego = stv06xx_isoc_nego, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 20/24] usb/gspca/xirlink_cit.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/xirlink_cit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/gspca/xirlink_cit.c b/drivers/media/usb/gspca/xirlink_cit.c index d4b23c9..7eaf64e 100644 --- a/drivers/media/usb/gspca/xirlink_cit.c +++ b/drivers/media/usb/gspca/xirlink_cit.c @@ -2759,7 +2759,7 @@ static void sd_stop0(struct gspca_dev *gspca_dev) break; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) /* If the last button state is pressed, release it now! */ if (sd-button_state) { input_report_key(gspca_dev-input_dev, KEY_CAMERA, 0); @@ -2914,7 +2914,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, gspca_frame_add(gspca_dev, INTER_PACKET, data, len); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static void cit_check_button(struct gspca_dev *gspca_dev) { int new_button_state; @@ -3062,7 +3062,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .stop0 = sd_stop0, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .dq_callback = cit_check_button, .other_input = 1, #endif @@ -3079,7 +3079,7 @@ static const struct sd_desc sd_desc_isoc_nego = { .stopN = sd_stopN, .stop0 = sd_stop0, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .dq_callback = cit_check_button, .other_input = 1, #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 21/24] usb/gspca/zc3xx.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/zc3xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/zc3xx.c b/drivers/media/usb/gspca/zc3xx.c index 77c5775..a8dc421 100644 --- a/drivers/media/usb/gspca/zc3xx.c +++ b/drivers/media/usb/gspca/zc3xx.c @@ -6902,7 +6902,7 @@ static int sd_get_jcomp(struct gspca_dev *gspca_dev, return 0; } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet data */ int len)/* interrput packet length */ @@ -6929,7 +6929,7 @@ static const struct sd_desc sd_desc = { .pkt_scan = sd_pkt_scan, .get_jcomp = sd_get_jcomp, .set_jcomp = sd_set_jcomp, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif }; -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 22/24] usb/hdpvr/hdpvr-core.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_I2C) || \ defined(CONFIG_I2C_MODULE) with: #if IS_ENABLED(CONFIG_I2C) This change was made for: CONFIG_I2C Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/hdpvr/hdpvr-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c index 84dc26f..5c61935 100644 --- a/drivers/media/usb/hdpvr/hdpvr-core.c +++ b/drivers/media/usb/hdpvr/hdpvr-core.c @@ -391,7 +391,7 @@ static int hdpvr_probe(struct usb_interface *interface, goto error; } -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) +#if IS_ENABLED(CONFIG_I2C) retval = hdpvr_register_i2c_adapter(dev); if (retval 0) { v4l2_err(dev-v4l2_dev, i2c adapter register failed\n); @@ -419,7 +419,7 @@ static int hdpvr_probe(struct usb_interface *interface, return 0; reg_fail: -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) +#if IS_ENABLED(CONFIG_I2C) i2c_del_adapter(dev-i2c_adapter); #endif error: @@ -451,7 +451,7 @@ static void hdpvr_disconnect(struct usb_interface *interface) mutex_lock(dev-io_mutex); hdpvr_cancel_queue(dev); mutex_unlock(dev-io_mutex); -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) +#if IS_ENABLED(CONFIG_I2C) i2c_del_adapter(dev-i2c_adapter); #endif video_unregister_device(dev-video_dev); -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 23/24] usb/hdpvr/hdpvr-i2c.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_I2C) || \ defined(CONFIG_I2C_MODULE) with: #if IS_ENABLED(CONFIG_I2C) This change was made for: CONFIG_I2C Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/hdpvr/hdpvr-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/hdpvr/hdpvr-i2c.c b/drivers/media/usb/hdpvr/hdpvr-i2c.c index 6c5054f..a38f58c 100644 --- a/drivers/media/usb/hdpvr/hdpvr-i2c.c +++ b/drivers/media/usb/hdpvr/hdpvr-i2c.c @@ -13,7 +13,7 @@ * */ -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) +#if IS_ENABLED(CONFIG_I2C) #include linux/i2c.h #include linux/slab.h -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 24/24] v4l2-core/v4l2-common.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_MEDIA_TUNER_TEA5761) || \ defined(CONFIG_MEDIA_TUNER_TEA5761_MODULE) with: #if IS_ENABLED(CONFIG_MEDIA_TUNER_TEA5761) This change was made for: CONFIG_MEDIA_TUNER_TEA5761 Also replaced: #if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) defined(MODULE)) with: #if IS_ENABLED(CONFIG_I2C) Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject Fixed commit message drivers/media/v4l2-core/v4l2-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c index 614316f..aa044f4 100644 --- a/drivers/media/v4l2-core/v4l2-common.c +++ b/drivers/media/v4l2-core/v4l2-common.c @@ -238,7 +238,7 @@ int v4l2_chip_match_host(const struct v4l2_dbg_match *match) } EXPORT_SYMBOL(v4l2_chip_match_host); -#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) defined(MODULE)) +#if IS_ENABLED(CONFIG_I2C) int v4l2_chip_match_i2c_client(struct i2c_client *c, const struct v4l2_dbg_match *match) { int len; @@ -384,7 +384,7 @@ EXPORT_SYMBOL_GPL(v4l2_i2c_subdev_addr); const unsigned short *v4l2_i2c_tuner_addrs(enum v4l2_i2c_tuner_type type) { static const unsigned short radio_addrs[] = { -#if defined(CONFIG_MEDIA_TUNER_TEA5761) || defined(CONFIG_MEDIA_TUNER_TEA5761_MODULE) +#if IS_ENABLED(CONFIG_MEDIA_TUNER_TEA5761) 0x10, #endif 0x60, -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 14/24] usb/gspca/sn9c20x.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT) || \ defined(CONFIG_INPUT_MODULE) with: #if IS_ENABLED(CONFIG_INPUT) This change was made for: CONFIG_INPUT Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated subject drivers/media/usb/gspca/sn9c20x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c index 41f769f..4ec544f 100644 --- a/drivers/media/usb/gspca/sn9c20x.c +++ b/drivers/media/usb/gspca/sn9c20x.c @@ -2205,7 +2205,7 @@ static void qual_upd(struct work_struct *work) mutex_unlock(gspca_dev-usb_lock); } -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, u8 *data, /* interrupt packet */ int len)/* interrupt packet length */ @@ -2349,7 +2349,7 @@ static const struct sd_desc sd_desc = { .stopN = sd_stopN, .stop0 = sd_stop0, .pkt_scan = sd_pkt_scan, -#if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) +#if IS_ENABLED(CONFIG_INPUT) .int_pkt_scan = sd_int_pkt_scan, #endif .dq_callback = sd_dqcallback, -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] use IS_ENABLED() macro
This patch introduces the use of IS_ENABLED() macro. For example, replacing: #if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) defined(MODULE)) with: #if IS_ENABLED(CONFIG_I2C) All changes made by this patch respect the same replacement pattern. Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-frontends/bcm3510.h | 2 +- drivers/media/dvb-frontends/cx22700.h | 2 +- drivers/media/dvb-frontends/cx24110.h | 2 +- drivers/media/dvb-frontends/dib0070.h | 2 +- drivers/media/dvb-frontends/dib0090.h | 2 +- drivers/media/dvb-frontends/dib3000.h | 2 +- drivers/media/dvb-frontends/dib8000.h | 2 +- drivers/media/dvb-frontends/dib9000.h | 2 +- drivers/media/dvb-frontends/dvb-pll.h | 2 +- drivers/media/dvb-frontends/isl6405.h | 2 +- drivers/media/dvb-frontends/isl6421.h | 2 +- drivers/media/dvb-frontends/isl6423.h | 2 +- drivers/media/dvb-frontends/itd1000.h | 2 +- drivers/media/dvb-frontends/l64781.h | 2 +- drivers/media/dvb-frontends/lgdt330x.h| 2 +- drivers/media/dvb-frontends/mb86a16.h | 2 +- drivers/media/dvb-frontends/mt312.h | 2 +- drivers/media/dvb-frontends/mt352.h | 2 +- drivers/media/dvb-frontends/nxt200x.h | 2 +- drivers/media/dvb-frontends/nxt6000.h | 2 +- drivers/media/dvb-frontends/or51132.h | 2 +- drivers/media/dvb-frontends/or51211.h | 2 +- drivers/media/dvb-frontends/s5h1420.h | 2 +- drivers/media/dvb-frontends/sp8870.h | 2 +- drivers/media/dvb-frontends/sp887x.h | 2 +- drivers/media/dvb-frontends/stb0899_drv.h | 2 +- drivers/media/dvb-frontends/stb6100.h | 2 +- drivers/media/dvb-frontends/stv0297.h | 2 +- drivers/media/dvb-frontends/stv0299.h | 2 +- drivers/media/dvb-frontends/stv090x.h | 2 +- drivers/media/dvb-frontends/stv6110x.h| 2 +- drivers/media/dvb-frontends/tda1002x.h| 5 ++--- drivers/media/dvb-frontends/tda1004x.h| 2 +- drivers/media/dvb-frontends/tda10086.h| 2 +- drivers/media/dvb-frontends/tda665x.h | 2 +- drivers/media/dvb-frontends/tda8083.h | 2 +- drivers/media/dvb-frontends/tda8261.h | 2 +- drivers/media/dvb-frontends/tda826x.h | 2 +- drivers/media/dvb-frontends/tua6100.h | 2 +- drivers/media/dvb-frontends/ves1820.h | 2 +- drivers/media/dvb-frontends/ves1x93.h | 2 +- drivers/media/dvb-frontends/zl10353.h | 2 +- drivers/media/pci/cx88/cx88-dvb.c | 4 ++-- drivers/media/pci/cx88/cx88-vp3054-i2c.h | 2 +- drivers/media/tuners/mt2060.h | 2 +- drivers/media/tuners/mt2063.h | 2 +- drivers/media/tuners/mt20xx.h | 2 +- drivers/media/tuners/mt2131.h | 2 +- drivers/media/tuners/mt2266.h | 2 +- drivers/media/tuners/mxl5007t.h | 2 +- drivers/media/tuners/qt1010.h | 2 +- drivers/media/tuners/tda18271.h | 2 +- drivers/media/tuners/tda827x.h| 2 +- drivers/media/tuners/tda8290.h| 2 +- drivers/media/tuners/tda9887.h| 2 +- drivers/media/tuners/tea5761.h| 2 +- drivers/media/tuners/tea5767.h| 2 +- drivers/media/tuners/tuner-simple.h | 2 +- drivers/media/tuners/tuner-xc2028.h | 2 +- drivers/media/tuners/xc4000.h | 2 +- drivers/media/v4l2-core/v4l2-device.c | 2 +- 61 files changed, 63 insertions(+), 64 deletions(-) diff --git a/drivers/media/dvb-frontends/bcm3510.h b/drivers/media/dvb-frontends/bcm3510.h index f4575c0..5bd56b1 100644 --- a/drivers/media/dvb-frontends/bcm3510.h +++ b/drivers/media/dvb-frontends/bcm3510.h @@ -34,7 +34,7 @@ struct bcm3510_config int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); }; -#if defined(CONFIG_DVB_BCM3510) || (defined(CONFIG_DVB_BCM3510_MODULE) defined(MODULE)) +#if IS_ENABLED(CONFIG_DVB_BCM3510) extern struct dvb_frontend* bcm3510_attach(const struct bcm3510_config* config, struct i2c_adapter* i2c); #else diff --git a/drivers/media/dvb-frontends/cx22700.h b/drivers/media/dvb-frontends/cx22700.h index 4757a93..382a7b1 100644 --- a/drivers/media/dvb-frontends/cx22700.h +++ b/drivers/media/dvb-frontends/cx22700.h @@ -31,7 +31,7 @@ struct cx22700_config u8 demod_address; }; -#if defined(CONFIG_DVB_CX22700) || (defined(CONFIG_DVB_CX22700_MODULE) defined(MODULE)) +#if IS_ENABLED(CONFIG_DVB_CX22700) extern struct dvb_frontend* cx22700_attach(const struct cx22700_config* config, struct i2c_adapter* i2c); #else diff --git a/drivers/media/dvb-frontends/cx24110.h b/drivers/media/dvb-frontends/cx24110.h index fdcceee..527aff1 100644 --- a/drivers/media/dvb-frontends/cx24110.h +++ b/drivers/media/dvb-frontends/cx24110.h @@ -46,7 +46,7 @@ static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val
[PATCH 2/3] pci/ttpci/av7110.c: use IS_ENABLED() macro
replace: #if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) with: #if IS_ENABLED(CONFIG_INPUT_EVDEV) This change was made for: CONFIG_INPUT_EVDEV, CONFIG_DVB_SP8870 Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/ttpci/av7110.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c index 2f54e2b..fc9e7e5 100644 --- a/drivers/media/pci/ttpci/av7110.c +++ b/drivers/media/pci/ttpci/av7110.c @@ -235,7 +235,7 @@ static void recover_arm(struct av7110 *av7110) restart_feeds(av7110); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_check_ir_config(av7110, true); #endif } @@ -268,7 +268,7 @@ static int arm_thread(void *data) if (!av7110-arm_ready) continue; -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_check_ir_config(av7110, false); #endif @@ -1730,7 +1730,7 @@ static int alps_tdlb7_tuner_set_params(struct dvb_frontend *fe) static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) { -#if defined(CONFIG_DVB_SP8870) || defined(CONFIG_DVB_SP8870_MODULE) +#if IS_ENABLED(CONFIG_DVB_SP8870) struct av7110* av7110 = fe-dvb-priv; return request_firmware(fw, name, av7110-dev-pci-dev); @@ -2725,7 +2725,7 @@ static int __devinit av7110_attach(struct saa7146_dev* dev, mutex_init(av7110-ioctl_mutex); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_ir_init(av7110); #endif printk(KERN_INFO dvb-ttpci: found av7110-%d.\n, av7110_num); @@ -2768,7 +2768,7 @@ static int __devexit av7110_detach(struct saa7146_dev* saa) struct av7110 *av7110 = saa-ext_priv; dprintk(4, %p\n, av7110); -#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE) +#if IS_ENABLED(CONFIG_INPUT_EVDEV) av7110_ir_exit(av7110); #endif if (budgetpatch || av7110-full_ts) { -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] pci/saa7134: use IS_ENABLED() macro
replace: #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) with: #if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) This change was made for: CONFIG_VIDEO_SAA7134_DVB Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/saa7134/saa7134.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h index 0a3feaa..ace44fd 100644 --- a/drivers/media/pci/saa7134/saa7134.h +++ b/drivers/media/pci/saa7134/saa7134.h @@ -42,7 +42,7 @@ #include media/videobuf-dma-sg.h #include sound/core.h #include sound/pcm.h -#if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) #include media/videobuf-dvb.h #endif @@ -644,7 +644,7 @@ struct saa7134_dev { struct work_struct empress_workqueue; intempress_started; -#if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB) /* SAA7134_MPEG_DVB only */ struct videobuf_dvb_frontends frontends; int (*original_demod_sleep)(struct dvb_frontend *fe); -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] pci/cx88: use IS_ENABLED() macro
replace: #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) with: #if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) This change was made for: CONFIG_VIDEO_CX88_DVB, CONFIG_VIDEO_CX88_BLACKBIRD, CONFIG_VIDEO_CX88_VP3054 Reported-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/cx88/cx88.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h index ba0dba4..feff53c 100644 --- a/drivers/media/pci/cx88/cx88.h +++ b/drivers/media/pci/cx88/cx88.h @@ -363,7 +363,7 @@ struct cx88_core { unsigned int tuner_formats; /* config info -- dvb */ -#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) int(*prev_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage); #endif void (*gate_ctrl)(struct cx88_core *core, int open); @@ -562,8 +562,7 @@ struct cx8802_dev { /* for blackbird only */ struct list_head devlist; -#if defined(CONFIG_VIDEO_CX88_BLACKBIRD) || \ -defined(CONFIG_VIDEO_CX88_BLACKBIRD_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_BLACKBIRD) struct video_device*mpeg_dev; u32mailbox; intwidth; @@ -574,13 +573,12 @@ struct cx8802_dev { struct cx2341x_handler cxhdl; #endif -#if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_DVB) /* for dvb only */ struct videobuf_dvb_frontends frontends; #endif -#if defined(CONFIG_VIDEO_CX88_VP3054) || \ -defined(CONFIG_VIDEO_CX88_VP3054_MODULE) +#if IS_ENABLED(CONFIG_VIDEO_CX88_VP3054) /* For VP3045 secondary I2C bus support */ struct vp3054_i2c_state*vp3054; #endif -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] Staging/media: fixed spacing coding style in go7007/wis-ov7640.c
On Fri, Nov 2, 2012 at 1:08 PM, YAMANE Toshiaki yamaneto...@gmail.com wrote: fixed below checkpatch error. - ERROR: that open brace { should be on the previous line Signed-off-by: YAMANE Toshiaki yamaneto...@gmail.com Tested-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/staging/media/go7007/wis-ov7640.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/go7007/wis-ov7640.c b/drivers/staging/media/go7007/wis-ov7640.c index 6bc9470..eb5efc9 100644 --- a/drivers/staging/media/go7007/wis-ov7640.c +++ b/drivers/staging/media/go7007/wis-ov7640.c @@ -29,8 +29,7 @@ struct wis_ov7640 { int hue; }; -static u8 initial_registers[] = -{ +static u8 initial_registers[] = { 0x12, 0x80, 0x12, 0x54, 0x14, 0x24, -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] Staging/media: Use dev_ printks in go7007/wis-ov7640.c
On Fri, Nov 2, 2012 at 1:09 PM, YAMANE Toshiaki yamaneto...@gmail.com wrote: fixed below checkpatch warnings. - WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: YAMANE Toshiaki yamaneto...@gmail.com Tested-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/staging/media/go7007/wis-ov7640.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/go7007/wis-ov7640.c b/drivers/staging/media/go7007/wis-ov7640.c index eb5efc9..fe46374 100644 --- a/drivers/staging/media/go7007/wis-ov7640.c +++ b/drivers/staging/media/go7007/wis-ov7640.c @@ -59,12 +59,12 @@ static int wis_ov7640_probe(struct i2c_client *client, client-flags = I2C_CLIENT_SCCB; - printk(KERN_DEBUG + dev_dbg(client-dev, wis-ov7640: initializing OV7640 at address %d on %s\n, client-addr, adapter-name); if (write_regs(client, initial_registers) 0) { - printk(KERN_ERR wis-ov7640: error initializing OV7640\n); + dev_err(client-dev, wis-ov7640: error initializing OV7640\n); return -ENODEV; } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] staging/media: Use dev_ printks in cxd2099/cxd2099.[ch]
On Fri, Nov 2, 2012 at 9:48 AM, YAMANE Toshiaki yamaneto...@gmail.com wrote: fixed below checkpatch warnings. - 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 ... - WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... Signed-off-by: YAMANE Toshiaki yamaneto...@gmail.com Tested-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/staging/media/cxd2099/cxd2099.c | 29 +++-- drivers/staging/media/cxd2099/cxd2099.h |2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/staging/media/cxd2099/cxd2099.c b/drivers/staging/media/cxd2099/cxd2099.c index 0ff1972..822c487 100644 --- a/drivers/staging/media/cxd2099/cxd2099.c +++ b/drivers/staging/media/cxd2099/cxd2099.c @@ -66,8 +66,9 @@ static int i2c_write_reg(struct i2c_adapter *adapter, u8 adr, struct i2c_msg msg = {.addr = adr, .flags = 0, .buf = m, .len = 2}; if (i2c_transfer(adapter, msg, 1) != 1) { - printk(KERN_ERR Failed to write to I2C register %02x@%02x!\n, - reg, adr); + dev_err(adapter-dev, + Failed to write to I2C register %02x@%02x!\n, + reg, adr); return -1; } return 0; @@ -79,7 +80,7 @@ static int i2c_write(struct i2c_adapter *adapter, u8 adr, struct i2c_msg msg = {.addr = adr, .flags = 0, .buf = data, .len = len}; if (i2c_transfer(adapter, msg, 1) != 1) { - printk(KERN_ERR Failed to write to I2C!\n); + dev_err(adapter-dev, Failed to write to I2C!\n); return -1; } return 0; @@ -94,7 +95,7 @@ static int i2c_read_reg(struct i2c_adapter *adapter, u8 adr, .buf = val, .len = 1} }; if (i2c_transfer(adapter, msgs, 2) != 2) { - printk(KERN_ERR error in i2c_read_reg\n); + dev_err(adapter-dev, error in i2c_read_reg\n); return -1; } return 0; @@ -109,7 +110,7 @@ static int i2c_read(struct i2c_adapter *adapter, u8 adr, .buf = data, .len = n} }; if (i2c_transfer(adapter, msgs, 2) != 2) { - printk(KERN_ERR error in i2c_read\n); + dev_err(adapter-dev, error in i2c_read\n); return -1; } return 0; @@ -277,7 +278,7 @@ static void cam_mode(struct cxd *ci, int mode) #ifdef BUFFER_MODE if (!ci-en.read_data) return; - printk(KERN_INFO enable cam buffer mode\n); + dev_info(ci-i2c-dev, enable cam buffer mode\n); /* write_reg(ci, 0x0d, 0x00); */ /* write_reg(ci, 0x0e, 0x01); */ write_regm(ci, 0x08, 0x40, 0x40); @@ -524,7 +525,7 @@ static int slot_reset(struct dvb_ca_en50221 *ca, int slot) msleep(10); #if 0 read_reg(ci, 0x06, val); - printk(KERN_INFO %d:%02x\n, i, val); + dev_info(ci-i2c-dev, %d:%02x\n, i, val); if (!(val0x10)) break; #else @@ -542,7 +543,7 @@ static int slot_shutdown(struct dvb_ca_en50221 *ca, int slot) { struct cxd *ci = ca-data; - printk(KERN_INFO slot_shutdown\n); + dev_info(ci-i2c-dev, slot_shutdown\n); mutex_lock(ci-lock); write_regm(ci, 0x09, 0x08, 0x08); write_regm(ci, 0x20, 0x80, 0x80); /* Reset CAM Mode */ @@ -578,10 +579,10 @@ static int campoll(struct cxd *ci) if (istat0x40) { ci-dr = 1; - printk(KERN_INFO DR\n); + dev_info(ci-i2c-dev, DR\n); } if (istat0x20) - printk(KERN_INFO WC\n); + dev_info(ci-i2c-dev, WC\n); if (istat2) { u8 slotstat; @@ -597,7 +598,7 @@ static int campoll(struct cxd *ci) if (ci-slot_stat) { ci-slot_stat = 0; write_regm(ci, 0x03, 0x00, 0x08); - printk(KERN_INFO NO CAM\n); + dev_info(ci-i2c-dev, NO CAM\n); ci-ready = 0; } } @@ -634,7 +635,7 @@ static int read_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount) campoll(ci); mutex_unlock(ci-lock); - printk(KERN_INFO read_data\n); + dev_info(ci-i2c-dev, read_data\n); if (!ci-dr) return 0; @@ -687,7 +688,7 @@ struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg
[PATCH] drivers/media/pci/saa7134/saa7134-dvb.c: Test if videobuf_dvb_get_frontend return NULL
Based on commit: e66131cee501ee720b7b58a4b87073b8fbaaaba6 Not testing videobuf_dvb_get_frontend output may cause OOPS if it return NULL. This patch fixes this issue. The semantic patch that found this issue is(http://coccinelle.lip6.fr/): // smpl @@ identifier i,a,b; statement S, S2; @@ i = videobuf_dvb_get_frontend(...); ... when != if (!i) S * if (i-a.b) S2 // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/saa7134/saa7134-dvb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/pci/saa7134/saa7134-dvb.c b/drivers/media/pci/saa7134/saa7134-dvb.c index b209de4..27915e5 100644 --- a/drivers/media/pci/saa7134/saa7134-dvb.c +++ b/drivers/media/pci/saa7134/saa7134-dvb.c @@ -607,6 +607,9 @@ static int configure_tda827x_fe(struct saa7134_dev *dev, /* Get the first frontend */ fe0 = videobuf_dvb_get_frontend(dev-frontends, 1); + if (!fe0) + return -EINVAL; + fe0-dvb.frontend = dvb_attach(tda10046_attach, cdec_conf, dev-i2c_adap); if (fe0-dvb.frontend) { if (cdec_conf-i2c_gate) -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2] drivers/media/v4l2-core/videobuf2-core.c: fix error return code
when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from V1: Updated commit message drivers/media/v4l2-core/videobuf2-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 432df11..dad10af 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -1878,8 +1878,10 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read) */ for (i = 0; i q-num_buffers; i++) { fileio-bufs[i].vaddr = vb2_plane_vaddr(q-bufs[i], 0); - if (fileio-bufs[i].vaddr == NULL) + if (fileio-bufs[i].vaddr == NULL) { + ret = -EFAULT; goto err_reqbufs; + } fileio-bufs[i].size = vb2_plane_size(q-bufs[i], 0); } -- 1.7.11.7 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2] drivers/media/v4l2-core/videobuf2-core.c: fix error return code
On Thu, Oct 18, 2012 at 5:28 PM, Ezequiel Garcia elezegar...@gmail.com wrote: On Thu, Oct 18, 2012 at 11:47 AM, Peter Senna Tschudin peter.se...@gmail.com wrote: This patch fixes a NULL pointer dereference bug at __vb2_init_fileio(). The NULL pointer deference happens at videobuf2-core.c: static size_t __vb2_perform_fileio(struct vb2_queue *q, char __user *data, size_t count, loff_t *ppos, int nonblock, int read) { ... if (!q-fileio) { ret = __vb2_init_fileio(q, read); dprintk(3, file io: vb2_init_fileio result: %d\n, ret); if (ret) return ret; } fileio = q-fileio; // NULL pointer deference here ... } It was tested with vivi driver and qv4l2 for selecting read() as capture method. The OOPS happened when I've artificially forced the error by commenting the line: if (fileio-bufs[i].vaddr == NULL) ... but if you manually changed the original source, how can this be a real BUG? It is supposed that under some circumstances, (fileio-bufs[i].vaddr == NULL) can be true. 'While testing', my change forced the scenario in which (fileio-bufs[i].vaddr == NULL) is true... Or am I missing something here ? Ezequiel -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/14] drivers/media/v4l2-core/videobuf2-core.c: fix error return code
On Sat, Oct 6, 2012 at 1:17 PM, Mauro Carvalho Chehab mche...@infradead.org wrote: Em Thu, 6 Sep 2012 17:23:57 +0200 Peter Senna Tschudin peter.se...@gmail.com escreveu: From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl ( if@p1 (\(ret 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/v4l2-core/videobuf2-core.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 4da3df6..f6bc240 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -1876,8 +1876,10 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read) */ for (i = 0; i q-num_buffers; i++) { fileio-bufs[i].vaddr = vb2_plane_vaddr(q-bufs[i], 0); - if (fileio-bufs[i].vaddr == NULL) + if (fileio-bufs[i].vaddr == NULL) { + ret = -EFAULT; goto err_reqbufs; + } Had you test this patch? I suspect it breaks the driver, as there are failures under streaming handling that are acceptable, as it may indicate that userspace was not able to handle all queued frames in time. On such cases, what the Kernel does is to just discard the frame. Userspace is able to detect it, by looking inside the timestamp added on each frame. No, I have not tested it. This was the only place the function was returning non negative value for error path, so looked as a bug to me. May I add a comment about returning non-negative value is intended there? fileio-bufs[i].size = vb2_plane_size(q-bufs[i], 0); } -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Cheers, Mauro -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] drivers/media: Remove unnecessary semicolon
A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p r1.p; p1 r1.p1; @@ if p[0].line != p1[0].line_end: cocci.include_match(False) @@ position r1.p; @@ -;@p // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Changes from v2: Include semantic patch in the commit message. The full version of the semantic patch can be found at: http://comments.gmane.org/gmane.comp.version-control.coccinelle/2724 drivers/media/dvb-core/dvb_frontend.c | 2 +- drivers/media/dvb-frontends/a8293.c | 2 +- drivers/media/dvb-frontends/af9013.c | 6 +++--- drivers/media/dvb-frontends/bcm3510.c | 2 +- drivers/media/dvb-frontends/cx24110.c | 6 +++--- drivers/media/dvb-frontends/drxd_hard.c | 2 +- drivers/media/dvb-frontends/isl6405.c | 2 +- drivers/media/dvb-frontends/isl6421.c | 2 +- drivers/media/dvb-frontends/itd1000.c | 2 +- drivers/media/dvb-frontends/lnbp21.c | 4 ++-- drivers/media/dvb-frontends/lnbp22.c | 2 +- drivers/media/dvb-frontends/si21xx.c | 4 ++-- drivers/media/dvb-frontends/sp8870.c | 6 +++--- drivers/media/dvb-frontends/sp887x.c | 6 +++--- drivers/media/dvb-frontends/stv0299.c | 6 +++--- drivers/media/dvb-frontends/stv0900_core.c| 4 ++-- drivers/media/dvb-frontends/tda8083.c | 4 ++-- drivers/media/i2c/cx25840/cx25840-core.c | 2 +- drivers/media/pci/bt8xx/dst_ca.c | 2 +- drivers/media/pci/cx23885/altera-ci.c | 4 ++-- drivers/media/pci/cx23885/cimax2.c| 2 +- drivers/media/pci/cx88/cx88-blackbird.c | 6 +++--- drivers/media/pci/cx88/cx88-dvb.c | 2 +- drivers/media/pci/cx88/cx88-mpeg.c| 2 +- drivers/media/pci/cx88/cx88-tvaudio.c | 4 ++-- drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/pci/saa7134/saa7134-video.c | 2 +- drivers/media/platform/exynos-gsc/gsc-regs.c | 4 ++-- drivers/media/radio/si470x/radio-si470x-i2c.c | 2 +- drivers/media/radio/si470x/radio-si470x-usb.c | 2 +- drivers/media/radio/si4713-i2c.c | 12 ++-- drivers/media/usb/dvb-usb-v2/af9015.c | 4 ++-- drivers/media/usb/dvb-usb-v2/af9035.c | 2 +- 33 files changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 479a5e5..b5f141a 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2288,7 +2288,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file, fepriv-tune_mode_flags = (unsigned long) parg; err = 0; break; - }; + } return err; } diff --git a/drivers/media/dvb-frontends/a8293.c b/drivers/media/dvb-frontends/a8293.c index cff44a3..74fbb5d 100644 --- a/drivers/media/dvb-frontends/a8293.c +++ b/drivers/media/dvb-frontends/a8293.c @@ -90,7 +90,7 @@ static int a8293_set_voltage(struct dvb_frontend *fe, default: ret = -EINVAL; goto err; - }; + } ret = a8293_wr(priv, priv-reg[0], 1); if (ret) diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c index e9f04a3..a204f28 100644 --- a/drivers/media/dvb-frontends/af9013.c +++ b/drivers/media/dvb-frontends/af9013.c @@ -241,7 +241,7 @@ static int af9013_set_gpio(struct af9013_state *state, u8 gpio, u8 gpioval) KBUILD_MODNAME, gpio); ret = -EINVAL; goto err; - }; + } switch (gpio) { case 0: @@ -253,7 +253,7 @@ static int af9013_set_gpio(struct af9013_state *state, u8 gpio, u8 gpioval) default: pos = 4; break; - }; + } ret = af9013_wr_reg_bits(state, addr, pos, 4, gpioval); if (ret) @@ -726,7 +726,7 @@ static int af9013_set_frontend(struct dvb_frontend *fe) default: dev_dbg(state-i2c-dev, %s: invalid hierarchy\n, __func__); auto_mode = 1; - }; + } switch (c-modulation) { case QAM_AUTO: diff --git a/drivers/media/dvb-frontends/bcm3510.c b/drivers/media/dvb-frontends/bcm3510.c index 033cd7a..1b77909 100644 --- a/drivers/media/dvb-frontends/bcm3510.c +++ b/drivers/media/dvb-frontends/bcm3510.c @@ -527,7 +527,7 @@ static int bcm3510_set_frontend(struct dvb_frontend *fe) cmd.ACQUIRE1.IF_FREQ = 0x0; default: return -EINVAL; - }; + } cmd.ACQUIRE0.OFFSET = 0; cmd.ACQUIRE0.NTSCSWEEP = 1; cmd.ACQUIRE0.FA = 1; diff --git a/drivers/media/dvb-frontends/cx24110.c b/drivers/media/dvb-frontends/cx24110.c
[PATCH] drivers/media: Remove unnecessary semicolon
Remove unnecessary semicolon And: drivers/media/dvb-frontends/stv0900_core.c: remove unnecessary whitespace before a quoted newline Found by http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-core/dvb_frontend.c |2 drivers/media/dvb-frontends/a8293.c |2 drivers/media/dvb-frontends/af9013.c |6 +- drivers/media/dvb-frontends/bcm3510.c |2 drivers/media/dvb-frontends/cx24110.c |6 +- drivers/media/dvb-frontends/drxd_hard.c |2 drivers/media/dvb-frontends/isl6405.c |2 drivers/media/dvb-frontends/isl6421.c |2 drivers/media/dvb-frontends/itd1000.c |2 drivers/media/dvb-frontends/lnbp21.c |4 - drivers/media/dvb-frontends/lnbp22.c |2 drivers/media/dvb-frontends/si21xx.c |4 - drivers/media/dvb-frontends/sp8870.c |6 +- drivers/media/dvb-frontends/sp887x.c |6 +- drivers/media/dvb-frontends/stv0299.c |6 +- drivers/media/dvb-frontends/stv0900_core.c|2 drivers/media/dvb-frontends/tda8083.c |4 - drivers/media/i2c/cx25840/cx25840-core.c |2 drivers/media/pci/bt8xx/dst_ca.c |2 drivers/media/pci/cx23885/altera-ci.c |4 - drivers/media/pci/cx23885/cimax2.c|2 drivers/media/pci/cx88/cx88-blackbird.c |6 +- drivers/media/pci/cx88/cx88-dvb.c |2 drivers/media/pci/cx88/cx88-mpeg.c|2 drivers/media/pci/cx88/cx88-tvaudio.c |4 - drivers/media/pci/cx88/cx88-video.c |2 drivers/media/pci/saa7134/saa7134-video.c |2 drivers/media/platform/davinci/vpif_capture.c | 78 +- drivers/media/platform/exynos-gsc/gsc-regs.c |4 - drivers/media/platform/fsl-viu.c | 18 +++--- drivers/media/platform/vivi.c |2 drivers/media/radio/si470x/radio-si470x-i2c.c |2 drivers/media/radio/si470x/radio-si470x-usb.c |2 drivers/media/radio/si4713-i2c.c | 12 ++-- drivers/media/usb/dvb-usb-v2/af9015.c |4 - drivers/media/usb/dvb-usb-v2/af9035.c |2 drivers/media/usb/dvb-usb/cinergyT2-fe.c |6 -- 37 files changed, 106 insertions(+), 112 deletions(-) diff -u -p a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c @@ -599,7 +599,7 @@ static void cx23885_initialize(struct i2 cx25840_write4(client, 0x114, 0x01bf0c9e); cx25840_write4(client, 0x110, 0x000a030c); break; - }; + } /* ADC2 input select */ cx25840_write(client, 0x102, 0x10); diff -u -p a/drivers/media/usb/dvb-usb-v2/af9015.c b/drivers/media/usb/dvb-usb-v2/af9015.c --- a/drivers/media/usb/dvb-usb-v2/af9015.c +++ b/drivers/media/usb/dvb-usb-v2/af9015.c @@ -500,7 +500,7 @@ static int af9015_read_config(struct dvb case 3: state-af9013_config[i].clock = 2500; break; - }; + } dev_dbg(d-udev-dev, %s: [%d] xtal=%d set clock=%d\n, __func__, i, val, state-af9013_config[i].clock); @@ -568,7 +568,7 @@ static int af9015_read_config(struct dvb supported, please report!\n, KBUILD_MODNAME, val); return -ENODEV; - }; + } state-af9013_config[i].tuner = val; dev_dbg(d-udev-dev, %s: [%d] tuner id=%d\n, diff -u -p a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -519,7 +519,7 @@ static int af9035_read_config(struct dvb dev_warn(d-udev-dev, %s: tuner id=%02x not \ supported, please report!, KBUILD_MODNAME, tmp); - }; + } /* tuner IF frequency */ ret = af9035_rd_reg(d, EEPROM_1_IFFREQ_L + eeprom_shift, tmp); diff -u -p a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2288,7 +2288,7 @@ static int dvb_frontend_ioctl_legacy(str fepriv-tune_mode_flags = (unsigned long) parg; err = 0; break; - }; + } return err; } diff -u -p a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c --- a/drivers/media/radio/si470x/radio-si470x-i2c.c
[PATCH v2] drivers/media: Remove unnecessary semicolon
Remove unnecessary semicolon And: drivers/media/dvb-frontends/stv0900_core.c: remove unnecessary whitespace before a quoted newline Found by http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-core/dvb_frontend.c | 2 +- drivers/media/dvb-frontends/a8293.c | 2 +- drivers/media/dvb-frontends/af9013.c | 6 +++--- drivers/media/dvb-frontends/bcm3510.c | 2 +- drivers/media/dvb-frontends/cx24110.c | 6 +++--- drivers/media/dvb-frontends/drxd_hard.c | 2 +- drivers/media/dvb-frontends/isl6405.c | 2 +- drivers/media/dvb-frontends/isl6421.c | 2 +- drivers/media/dvb-frontends/itd1000.c | 2 +- drivers/media/dvb-frontends/lnbp21.c | 4 ++-- drivers/media/dvb-frontends/lnbp22.c | 2 +- drivers/media/dvb-frontends/si21xx.c | 4 ++-- drivers/media/dvb-frontends/sp8870.c | 6 +++--- drivers/media/dvb-frontends/sp887x.c | 6 +++--- drivers/media/dvb-frontends/stv0299.c | 6 +++--- drivers/media/dvb-frontends/stv0900_core.c| 4 ++-- drivers/media/dvb-frontends/tda8083.c | 4 ++-- drivers/media/i2c/cx25840/cx25840-core.c | 2 +- drivers/media/pci/bt8xx/dst_ca.c | 2 +- drivers/media/pci/cx23885/altera-ci.c | 4 ++-- drivers/media/pci/cx23885/cimax2.c| 2 +- drivers/media/pci/cx88/cx88-blackbird.c | 6 +++--- drivers/media/pci/cx88/cx88-dvb.c | 2 +- drivers/media/pci/cx88/cx88-mpeg.c| 2 +- drivers/media/pci/cx88/cx88-tvaudio.c | 4 ++-- drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/pci/saa7134/saa7134-video.c | 2 +- drivers/media/platform/exynos-gsc/gsc-regs.c | 4 ++-- drivers/media/radio/si470x/radio-si470x-i2c.c | 2 +- drivers/media/radio/si470x/radio-si470x-usb.c | 2 +- drivers/media/radio/si4713-i2c.c | 12 ++-- drivers/media/usb/dvb-usb-v2/af9015.c | 4 ++-- drivers/media/usb/dvb-usb-v2/af9035.c | 2 +- 33 files changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 479a5e5..b5f141a 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2288,7 +2288,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file, fepriv-tune_mode_flags = (unsigned long) parg; err = 0; break; - }; + } return err; } diff --git a/drivers/media/dvb-frontends/a8293.c b/drivers/media/dvb-frontends/a8293.c index cff44a3..74fbb5d 100644 --- a/drivers/media/dvb-frontends/a8293.c +++ b/drivers/media/dvb-frontends/a8293.c @@ -90,7 +90,7 @@ static int a8293_set_voltage(struct dvb_frontend *fe, default: ret = -EINVAL; goto err; - }; + } ret = a8293_wr(priv, priv-reg[0], 1); if (ret) diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c index e9f04a3..a204f28 100644 --- a/drivers/media/dvb-frontends/af9013.c +++ b/drivers/media/dvb-frontends/af9013.c @@ -241,7 +241,7 @@ static int af9013_set_gpio(struct af9013_state *state, u8 gpio, u8 gpioval) KBUILD_MODNAME, gpio); ret = -EINVAL; goto err; - }; + } switch (gpio) { case 0: @@ -253,7 +253,7 @@ static int af9013_set_gpio(struct af9013_state *state, u8 gpio, u8 gpioval) default: pos = 4; break; - }; + } ret = af9013_wr_reg_bits(state, addr, pos, 4, gpioval); if (ret) @@ -726,7 +726,7 @@ static int af9013_set_frontend(struct dvb_frontend *fe) default: dev_dbg(state-i2c-dev, %s: invalid hierarchy\n, __func__); auto_mode = 1; - }; + } switch (c-modulation) { case QAM_AUTO: diff --git a/drivers/media/dvb-frontends/bcm3510.c b/drivers/media/dvb-frontends/bcm3510.c index 033cd7a..1b77909 100644 --- a/drivers/media/dvb-frontends/bcm3510.c +++ b/drivers/media/dvb-frontends/bcm3510.c @@ -527,7 +527,7 @@ static int bcm3510_set_frontend(struct dvb_frontend *fe) cmd.ACQUIRE1.IF_FREQ = 0x0; default: return -EINVAL; - }; + } cmd.ACQUIRE0.OFFSET = 0; cmd.ACQUIRE0.NTSCSWEEP = 1; cmd.ACQUIRE0.FA = 1; diff --git a/drivers/media/dvb-frontends/cx24110.c b/drivers/media/dvb-frontends/cx24110.c index 3180f5b..0cd6927 100644 --- a/drivers/media/dvb-frontends/cx24110.c +++ b/drivers/media/dvb-frontends/cx24110.c @@ -218,7 +218,7 @@ static int cx24110_set_fec (struct cx24110_state* state, fe_code_rate_t fec) } else return -EOPNOTSUPP; /* fixme (low): which is the correct return code
Re: [PATCH] drivers/media: Remove unnecessary semicolon
On Thu, Sep 27, 2012 at 1:55 PM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Peter, Thanks for the patch. On Thu, Sep 27, 2012 at 5:00 PM, Peter Senna Tschudin peter.se...@gmail.com wrote: Remove unnecessary semicolon And: drivers/media/dvb-frontends/stv0900_core.c: remove unnecessary whitespace before a quoted newline Found by http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-core/dvb_frontend.c |2 drivers/media/dvb-frontends/a8293.c |2 drivers/media/dvb-frontends/af9013.c |6 +- drivers/media/dvb-frontends/bcm3510.c |2 drivers/media/dvb-frontends/cx24110.c |6 +- drivers/media/dvb-frontends/drxd_hard.c |2 drivers/media/dvb-frontends/isl6405.c |2 drivers/media/dvb-frontends/isl6421.c |2 drivers/media/dvb-frontends/itd1000.c |2 drivers/media/dvb-frontends/lnbp21.c |4 - drivers/media/dvb-frontends/lnbp22.c |2 drivers/media/dvb-frontends/si21xx.c |4 - drivers/media/dvb-frontends/sp8870.c |6 +- drivers/media/dvb-frontends/sp887x.c |6 +- drivers/media/dvb-frontends/stv0299.c |6 +- drivers/media/dvb-frontends/stv0900_core.c|2 drivers/media/dvb-frontends/tda8083.c |4 - drivers/media/i2c/cx25840/cx25840-core.c |2 drivers/media/pci/bt8xx/dst_ca.c |2 drivers/media/pci/cx23885/altera-ci.c |4 - drivers/media/pci/cx23885/cimax2.c|2 drivers/media/pci/cx88/cx88-blackbird.c |6 +- drivers/media/pci/cx88/cx88-dvb.c |2 drivers/media/pci/cx88/cx88-mpeg.c|2 drivers/media/pci/cx88/cx88-tvaudio.c |4 - drivers/media/pci/cx88/cx88-video.c |2 drivers/media/pci/saa7134/saa7134-video.c |2 drivers/media/platform/davinci/vpif_capture.c | 78 +- I dont see any diff for this file in the patch. drivers/media/platform/exynos-gsc/gsc-regs.c |4 - drivers/media/platform/fsl-viu.c | 18 +++--- ditto drivers/media/platform/vivi.c |2 ditto and some more Is it a valid patch or is it that I am missing something ? I've sent V2 fixing this. Regards, --Prabhakar Lad drivers/media/radio/si470x/radio-si470x-i2c.c |2 drivers/media/radio/si470x/radio-si470x-usb.c |2 drivers/media/radio/si4713-i2c.c | 12 ++-- drivers/media/usb/dvb-usb-v2/af9015.c |4 - drivers/media/usb/dvb-usb-v2/af9035.c |2 drivers/media/usb/dvb-usb/cinergyT2-fe.c |6 -- 37 files changed, 106 insertions(+), 112 deletions(-) diff -u -p a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c @@ -599,7 +599,7 @@ static void cx23885_initialize(struct i2 cx25840_write4(client, 0x114, 0x01bf0c9e); cx25840_write4(client, 0x110, 0x000a030c); break; - }; + } /* ADC2 input select */ cx25840_write(client, 0x102, 0x10); diff -u -p a/drivers/media/usb/dvb-usb-v2/af9015.c b/drivers/media/usb/dvb-usb-v2/af9015.c --- a/drivers/media/usb/dvb-usb-v2/af9015.c +++ b/drivers/media/usb/dvb-usb-v2/af9015.c @@ -500,7 +500,7 @@ static int af9015_read_config(struct dvb case 3: state-af9013_config[i].clock = 2500; break; - }; + } dev_dbg(d-udev-dev, %s: [%d] xtal=%d set clock=%d\n, __func__, i, val, state-af9013_config[i].clock); @@ -568,7 +568,7 @@ static int af9015_read_config(struct dvb supported, please report!\n, KBUILD_MODNAME, val); return -ENODEV; - }; + } state-af9013_config[i].tuner = val; dev_dbg(d-udev-dev, %s: [%d] tuner id=%d\n, diff -u -p a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -519,7 +519,7 @@ static int af9035_read_config(struct dvb dev_warn(d-udev-dev, %s: tuner id=%02x not \ supported, please report!, KBUILD_MODNAME, tmp); - }; + } /* tuner IF frequency */ ret = af9035_rd_reg(d, EEPROM_1_IFFREQ_L + eeprom_shift, tmp); diff -u -p a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core
[PATCH v2] drivers/media: Remove unnecessary semicolon
Remove unnecessary semicolon And: drivers/media/dvb-frontends/stv0900_core.c: remove unnecessary whitespace before a quoted newline Found by http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-core/dvb_frontend.c | 2 +- drivers/media/dvb-frontends/a8293.c | 2 +- drivers/media/dvb-frontends/af9013.c | 6 +++--- drivers/media/dvb-frontends/bcm3510.c | 2 +- drivers/media/dvb-frontends/cx24110.c | 6 +++--- drivers/media/dvb-frontends/drxd_hard.c | 2 +- drivers/media/dvb-frontends/isl6405.c | 2 +- drivers/media/dvb-frontends/isl6421.c | 2 +- drivers/media/dvb-frontends/itd1000.c | 2 +- drivers/media/dvb-frontends/lnbp21.c | 4 ++-- drivers/media/dvb-frontends/lnbp22.c | 2 +- drivers/media/dvb-frontends/si21xx.c | 4 ++-- drivers/media/dvb-frontends/sp8870.c | 6 +++--- drivers/media/dvb-frontends/sp887x.c | 6 +++--- drivers/media/dvb-frontends/stv0299.c | 6 +++--- drivers/media/dvb-frontends/stv0900_core.c| 4 ++-- drivers/media/dvb-frontends/tda8083.c | 4 ++-- drivers/media/i2c/cx25840/cx25840-core.c | 2 +- drivers/media/pci/bt8xx/dst_ca.c | 2 +- drivers/media/pci/cx23885/altera-ci.c | 4 ++-- drivers/media/pci/cx23885/cimax2.c| 2 +- drivers/media/pci/cx88/cx88-blackbird.c | 6 +++--- drivers/media/pci/cx88/cx88-dvb.c | 2 +- drivers/media/pci/cx88/cx88-mpeg.c| 2 +- drivers/media/pci/cx88/cx88-tvaudio.c | 4 ++-- drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/pci/saa7134/saa7134-video.c | 2 +- drivers/media/platform/exynos-gsc/gsc-regs.c | 4 ++-- drivers/media/radio/si470x/radio-si470x-i2c.c | 2 +- drivers/media/radio/si470x/radio-si470x-usb.c | 2 +- drivers/media/radio/si4713-i2c.c | 12 ++-- drivers/media/usb/dvb-usb-v2/af9015.c | 4 ++-- drivers/media/usb/dvb-usb-v2/af9035.c | 2 +- 33 files changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 479a5e5..b5f141a 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2288,7 +2288,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file, fepriv-tune_mode_flags = (unsigned long) parg; err = 0; break; - }; + } return err; } diff --git a/drivers/media/dvb-frontends/a8293.c b/drivers/media/dvb-frontends/a8293.c index cff44a3..74fbb5d 100644 --- a/drivers/media/dvb-frontends/a8293.c +++ b/drivers/media/dvb-frontends/a8293.c @@ -90,7 +90,7 @@ static int a8293_set_voltage(struct dvb_frontend *fe, default: ret = -EINVAL; goto err; - }; + } ret = a8293_wr(priv, priv-reg[0], 1); if (ret) diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c index e9f04a3..a204f28 100644 --- a/drivers/media/dvb-frontends/af9013.c +++ b/drivers/media/dvb-frontends/af9013.c @@ -241,7 +241,7 @@ static int af9013_set_gpio(struct af9013_state *state, u8 gpio, u8 gpioval) KBUILD_MODNAME, gpio); ret = -EINVAL; goto err; - }; + } switch (gpio) { case 0: @@ -253,7 +253,7 @@ static int af9013_set_gpio(struct af9013_state *state, u8 gpio, u8 gpioval) default: pos = 4; break; - }; + } ret = af9013_wr_reg_bits(state, addr, pos, 4, gpioval); if (ret) @@ -726,7 +726,7 @@ static int af9013_set_frontend(struct dvb_frontend *fe) default: dev_dbg(state-i2c-dev, %s: invalid hierarchy\n, __func__); auto_mode = 1; - }; + } switch (c-modulation) { case QAM_AUTO: diff --git a/drivers/media/dvb-frontends/bcm3510.c b/drivers/media/dvb-frontends/bcm3510.c index 033cd7a..1b77909 100644 --- a/drivers/media/dvb-frontends/bcm3510.c +++ b/drivers/media/dvb-frontends/bcm3510.c @@ -527,7 +527,7 @@ static int bcm3510_set_frontend(struct dvb_frontend *fe) cmd.ACQUIRE1.IF_FREQ = 0x0; default: return -EINVAL; - }; + } cmd.ACQUIRE0.OFFSET = 0; cmd.ACQUIRE0.NTSCSWEEP = 1; cmd.ACQUIRE0.FA = 1; diff --git a/drivers/media/dvb-frontends/cx24110.c b/drivers/media/dvb-frontends/cx24110.c index 3180f5b..0cd6927 100644 --- a/drivers/media/dvb-frontends/cx24110.c +++ b/drivers/media/dvb-frontends/cx24110.c @@ -218,7 +218,7 @@ static int cx24110_set_fec (struct cx24110_state* state, fe_code_rate_t fec) } else return -EOPNOTSUPP; /* fixme (low): which is the correct return code
[PATCH V2 2/14] drivers/media/platform/soc_camera/mx2_camera.c: fix error return code
From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl ( if@p1 (\(ret 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/platform/soc_camera/mx2_camera.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c index 256187f..01d7c11 100644 --- a/drivers/media/platform/soc_camera/mx2_camera.c +++ b/drivers/media/platform/soc_camera/mx2_camera.c @@ -1800,12 +1800,14 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev) if (!res_emma || !irq_emma) { dev_err(pdev-dev, no EMMA resources\n); + err = -ENODEV; goto exit_free_irq; } pcdev-res_emma = res_emma; pcdev-irq_emma = irq_emma; - if (mx27_camera_emma_init(pcdev)) + err = mx27_camera_emma_init(pcdev); + if (err) goto exit_free_irq; } -- 1.7.11.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/5] drivers/media/platform/omap3isp/isp.c: fix error return code
On Sun, Sep 23, 2012 at 7:39 PM, Mauro Carvalho Chehab mche...@redhat.com wrote: Laurent, Could you please review this patch? Peter, Please, always c/c the driver maintainer/author on patches you submit. You can check it with scripts/get_maintainer.pl. Sorry for that. I'll be more careful next time. Thanks! Regards, Mauro Mensagem original Assunto: [PATCH 5/5] drivers/media/platform/omap3isp/isp.c: fix error return code Data: Tue, 4 Sep 2012 18:14:25 +0200 De: Peter Senna Tschudin peter.se...@gmail.com Para: Mauro Carvalho Chehab mche...@infradead.org CC: kernel-janit...@vger.kernel.org, julia.law...@lip6.fr, linux-media@vger.kernel.org, linux-ker...@vger.kernel.org From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl ( if@p1 (\(ret 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/platform/omap3isp/isp.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index e0096e0..91fcaef 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -2102,8 +2102,10 @@ static int __devinit isp_probe(struct platform_device *pdev) if (ret 0) goto error; - if (__omap3isp_get(isp, false) == NULL) + if (__omap3isp_get(isp, false) == NULL) { + ret = -EBUSY; /* Not sure if EBUSY is best for here */ goto error; + } ret = isp_reset(isp); if (ret 0) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] cx25821: Replace kmemdup for kstrdup and clean up
Replace kmemdup for kstrdup and cleanup related code. Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/cx25821/cx25821-audio-upstream.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/media/pci/cx25821/cx25821-audio-upstream.c b/drivers/media/pci/cx25821/cx25821-audio-upstream.c index 49a28ae..1cc797e 100644 --- a/drivers/media/pci/cx25821/cx25821-audio-upstream.c +++ b/drivers/media/pci/cx25821/cx25821-audio-upstream.c @@ -701,7 +701,6 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) { struct sram_channel *sram_ch; int err = 0; - int str_length = 0; if (dev-_audio_is_running) { pr_warn(Audio Channel is still running so return!\n); @@ -730,9 +729,8 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) _line_size = AUDIO_LINE_SIZE; if (dev-input_audiofilename) { - str_length = strlen(dev-input_audiofilename); - dev-_audiofilename = kmemdup(dev-input_audiofilename, - str_length + 1, GFP_KERNEL); + dev-_audiofilename = kstrdup(dev-input_audiofilename, + GFP_KERNEL); if (!dev-_audiofilename) { err = -ENOMEM; @@ -743,9 +741,8 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) if (strcmp(dev-input_audiofilename, ) == 0) dev-_audiofilename = /root/audioGOOD.wav; } else { - str_length = strlen(_defaultAudioName); - dev-_audiofilename = kmemdup(_defaultAudioName, - str_length + 1, GFP_KERNEL); + dev-_audiofilename = kstrdup(_defaultAudioName, + GFP_KERNEL); if (!dev-_audiofilename) { err = -ENOMEM; -- 1.7.11.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] cx25821: Cleanup filename assignment code
I'm pasting the original code and my proposal on the commit message for make it easy to compare the two versions. Line 62 of cx25821-audio-upstream.h contains: char *_defaultAudioName = /root/audioGOOD.wav; Original code after replace kmemdup for kstrdup, and after fix return error code: if (dev-input_audiofilename) { dev-_audiofilename = kstrdup(dev-input_audiofilename, GFP_KERNEL); if (!dev-_audiofilename) { err = -ENOMEM; goto error; } /* Default if filename is empty string */ if (strcmp(dev-input_audiofilename, ) == 0) dev-_audiofilename = /root/audioGOOD.wav; } else { dev-_audiofilename = kstrdup(_defaultAudioName, GFP_KERNEL); if (!dev-_audiofilename) { err = -ENOMEM; goto error; } } Code proposed in this patch: if ((dev-input_audiofilename) (strcmp(dev-input_audiofilename, ) != 0)) dev-_audiofilename = kstrdup(dev-input_audiofilename, GFP_KERNEL); else dev-_audiofilename = kstrdup(_defaultAudioName, GFP_KERNEL); if (!dev-_audiofilename) { err = -ENOMEM; goto error; } Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/cx25821/cx25821-audio-upstream.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/media/pci/cx25821/cx25821-audio-upstream.c b/drivers/media/pci/cx25821/cx25821-audio-upstream.c index 1cc797e..83316a8 100644 --- a/drivers/media/pci/cx25821/cx25821-audio-upstream.c +++ b/drivers/media/pci/cx25821/cx25821-audio-upstream.c @@ -728,26 +728,17 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) dev-_audio_lines_count = LINES_PER_AUDIO_BUFFER; _line_size = AUDIO_LINE_SIZE; - if (dev-input_audiofilename) { + if ((dev-input_audiofilename) + (strcmp(dev-input_audiofilename, ) != 0)) dev-_audiofilename = kstrdup(dev-input_audiofilename, GFP_KERNEL); - - if (!dev-_audiofilename) { - err = -ENOMEM; - goto error; - } - - /* Default if filename is empty string */ - if (strcmp(dev-input_audiofilename, ) == 0) - dev-_audiofilename = /root/audioGOOD.wav; - } else { + else dev-_audiofilename = kstrdup(_defaultAudioName, GFP_KERNEL); - if (!dev-_audiofilename) { - err = -ENOMEM; - goto error; - } + if (!dev-_audiofilename) { + err = -ENOMEM; + goto error; } cx25821_sram_channel_setup_upstream_audio(dev, sram_ch, -- 1.7.11.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] cx25821: fix error return code and clean up
From: Peter Senna Tschudin peter.se...@gmail.com The function cx25821_sram_channel_setup_upstream_audio always return zero, so the return value is not saved any more. Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl ( if@p1 (\(ret 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/pci/cx25821/cx25821-audio-upstream.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/media/pci/cx25821/cx25821-audio-upstream.c b/drivers/media/pci/cx25821/cx25821-audio-upstream.c index 8b2a999..49a28ae 100644 --- a/drivers/media/pci/cx25821/cx25821-audio-upstream.c +++ b/drivers/media/pci/cx25821/cx25821-audio-upstream.c @@ -700,7 +700,6 @@ fail_irq: int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) { struct sram_channel *sram_ch; - int retval = 0; int err = 0; int str_length = 0; @@ -735,8 +734,10 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) dev-_audiofilename = kmemdup(dev-input_audiofilename, str_length + 1, GFP_KERNEL); - if (!dev-_audiofilename) + if (!dev-_audiofilename) { + err = -ENOMEM; goto error; + } /* Default if filename is empty string */ if (strcmp(dev-input_audiofilename, ) == 0) @@ -746,12 +747,14 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) dev-_audiofilename = kmemdup(_defaultAudioName, str_length + 1, GFP_KERNEL); - if (!dev-_audiofilename) + if (!dev-_audiofilename) { + err = -ENOMEM; goto error; + } } - retval = cx25821_sram_channel_setup_upstream_audio(dev, sram_ch, - _line_size, 0); + cx25821_sram_channel_setup_upstream_audio(dev, sram_ch, + _line_size, 0); dev-audio_upstream_riscbuf_size = AUDIO_RISC_DMA_BUF_SIZE * NUM_AUDIO_PROGS + @@ -759,9 +762,9 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) dev-audio_upstream_databuf_size = AUDIO_DATA_BUF_SZ * NUM_AUDIO_PROGS; /* Allocating buffers and prepare RISC program */ - retval = cx25821_audio_upstream_buffer_prepare(dev, sram_ch, + err = cx25821_audio_upstream_buffer_prepare(dev, sram_ch, _line_size); - if (retval 0) { + if (err 0) { pr_err(%s: Failed to set up Audio upstream buffers!\n, dev-name); goto error; -- 1.7.11.4 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] drivers/media/platform/davinci/vpbe.c: Remove unused label and rename remaining labels
From: Peter Senna Tschudin peter.se...@gmail.com Remove unused label and rename remaining labels Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- Depends on patch [v2,7/8] drivers/media/platform/davinci/vpbe.c: Removes useless kfree() - http://patchwork.linuxtv.org/patch/14307/ drivers/media/platform/davinci/vpbe.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index 1125a87..4d8e399 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -626,11 +626,11 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) vpbe_dev-dac_clk = clk_get(vpbe_dev-pdev, vpss_dac); if (IS_ERR(vpbe_dev-dac_clk)) { ret = PTR_ERR(vpbe_dev-dac_clk); - goto vpbe_unlock; + goto fail_mutex_unlock; } if (clk_enable(vpbe_dev-dac_clk)) { ret = -ENODEV; - goto vpbe_unlock; + goto fail_mutex_unlock; } } @@ -642,7 +642,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) if (ret) { v4l2_err(dev-driver, Unable to register v4l2 device.\n); - goto vpbe_fail_clock; + goto fail_clk_put; } v4l2_info(vpbe_dev-v4l2_dev, vpbe v4l2 device registered\n); @@ -658,7 +658,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) v4l2_err(vpbe_dev-v4l2_dev, vpbe unable to init venc sub device\n); ret = -ENODEV; - goto vpbe_fail_v4l2_device; + goto fail_dev_unregister; } /* initialize osd device */ osd_device = vpbe_dev-osd_device; @@ -669,7 +669,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) v4l2_err(vpbe_dev-v4l2_dev, unable to initialize the OSD device); err = -ENOMEM; - goto vpbe_fail_v4l2_device; + goto fail_dev_unregister; } } @@ -685,7 +685,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) v4l2_err(vpbe_dev-v4l2_dev, unable to allocate memory for encoders sub devices); ret = -ENOMEM; - goto vpbe_fail_v4l2_device; + goto fail_dev_unregister; } i2c_adap = i2c_get_adapter(vpbe_dev-cfg-i2c_adapter_id); @@ -711,7 +711,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) failed to register, enc_info-module_name); ret = -ENODEV; - goto vpbe_fail_sd_register; + goto fail_kfree_encoders; } } else v4l2_warn(vpbe_dev-v4l2_dev, non-i2c encoders @@ -730,7 +730,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) amplifier %s failed to register, amp_info-module_name); ret = -ENODEV; - goto vpbe_fail_amp_register; + goto fail_kfree_encoders; } v4l2_info(vpbe_dev-v4l2_dev, v4l2 sub device %s registered\n, @@ -770,15 +770,14 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) /* TBD handling of bootargs for default output and mode */ return 0; -vpbe_fail_amp_register: -vpbe_fail_sd_register: +fail_kfree_encoders: kfree(vpbe_dev-encoders); -vpbe_fail_v4l2_device: +fail_dev_unregister: v4l2_device_unregister(vpbe_dev-v4l2_dev); -vpbe_fail_clock: +fail_clk_put: if (strcmp(vpbe_dev-cfg-module_name, dm644x-vpbe-display) != 0) clk_put(vpbe_dev-dac_clk); -vpbe_unlock: +fail_mutex_unlock: mutex_unlock(vpbe_dev-lock); return ret; } -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drivers/media: Removes useless kfree()
I'll split this patch in one patch for file and resend. On Wed, Sep 12, 2012 at 10:06 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Tue, Sep 11, 2012 at 08:00:32PM +0200, Peter Senna Tschudin wrote: diff --git a/drivers/media/dvb-frontends/lg2160.c b/drivers/media/dvb-frontends/lg2160.c index cc11260..748da5d 100644 --- a/drivers/media/dvb-frontends/lg2160.c +++ b/drivers/media/dvb-frontends/lg2160.c @@ -1451,7 +1451,6 @@ struct dvb_frontend *lg2160_attach(const struct lg2160_config *config, return state-frontend; fail: lg_warn(unable to detect LG216x hardware\n); - kfree(state); return NULL; } I wish you had fixed this the same as the others and removed the goto. Also the printk is redundant and wrong. Remove it too. regards, dan carpenter -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 2/8] drivers/media/dvb-frontends/lg2160.c: Removes useless kfree()
From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e = r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-frontends/lg2160.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/dvb-frontends/lg2160.c b/drivers/media/dvb-frontends/lg2160.c index cc11260..5fd14f8 100644 --- a/drivers/media/dvb-frontends/lg2160.c +++ b/drivers/media/dvb-frontends/lg2160.c @@ -1421,8 +1421,8 @@ struct dvb_frontend *lg2160_attach(const struct lg2160_config *config, config ? config-i2c_addr : 0); state = kzalloc(sizeof(struct lg216x_state), GFP_KERNEL); - if (state == NULL) - goto fail; + if (!state) + return NULL; state-cfg = config; state-i2c_adap = i2c_adap; @@ -1449,10 +1449,6 @@ struct dvb_frontend *lg2160_attach(const struct lg2160_config *config, state-frontend.dtv_property_cache.atscmh_parade_id = 1; return state-frontend; -fail: - lg_warn(unable to detect LG216x hardware\n); - kfree(state); - return NULL; } EXPORT_SYMBOL(lg2160_attach); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 8/8] drivers/media/tuners/mt2063.c: Removes useless kfree()
From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e = r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/tuners/mt2063.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/tuners/mt2063.c b/drivers/media/tuners/mt2063.c index 0ed9091..620c4fa 100644 --- a/drivers/media/tuners/mt2063.c +++ b/drivers/media/tuners/mt2063.c @@ -2249,8 +2249,8 @@ struct dvb_frontend *mt2063_attach(struct dvb_frontend *fe, dprintk(2, \n); state = kzalloc(sizeof(struct mt2063_state), GFP_KERNEL); - if (state == NULL) - goto error; + if (!state) + return NULL; state-config = config; state-i2c = i2c; @@ -2261,10 +2261,6 @@ struct dvb_frontend *mt2063_attach(struct dvb_frontend *fe, printk(KERN_INFO %s: Attaching MT2063\n, __func__); return fe; - -error: - kfree(state); - return NULL; } EXPORT_SYMBOL_GPL(mt2063_attach); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/8] drivers/media/dvb-frontends/dvb_dummy_fe.c: Removes useless kfree()
From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e = r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-frontends/dvb_dummy_fe.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/media/dvb-frontends/dvb_dummy_fe.c b/drivers/media/dvb-frontends/dvb_dummy_fe.c index dcfc902..d5acc30 100644 --- a/drivers/media/dvb-frontends/dvb_dummy_fe.c +++ b/drivers/media/dvb-frontends/dvb_dummy_fe.c @@ -121,16 +121,13 @@ struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void) /* allocate memory for the internal state */ state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); - if (state == NULL) goto error; + if (!state) + return NULL; /* create dvb_frontend */ memcpy(state-frontend.ops, dvb_dummy_fe_ofdm_ops, sizeof(struct dvb_frontend_ops)); state-frontend.demodulator_priv = state; return state-frontend; - -error: - kfree(state); - return NULL; } static struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops; @@ -141,16 +138,13 @@ struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void) /* allocate memory for the internal state */ state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); - if (state == NULL) goto error; + if (!state) + return NULL; /* create dvb_frontend */ memcpy(state-frontend.ops, dvb_dummy_fe_qpsk_ops, sizeof(struct dvb_frontend_ops)); state-frontend.demodulator_priv = state; return state-frontend; - -error: - kfree(state); - return NULL; } static struct dvb_frontend_ops dvb_dummy_fe_qam_ops; @@ -161,16 +155,13 @@ struct dvb_frontend *dvb_dummy_fe_qam_attach(void) /* allocate memory for the internal state */ state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); - if (state == NULL) goto error; + if (!state) + return NULL; /* create dvb_frontend */ memcpy(state-frontend.ops, dvb_dummy_fe_qam_ops, sizeof(struct dvb_frontend_ops)); state-frontend.demodulator_priv = state; return state-frontend; - -error: - kfree(state); - return NULL; } static struct dvb_frontend_ops dvb_dummy_fe_ofdm_ops = { -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 3/8] drivers/media/dvb-frontends/s5h1432.c: Removes useless kfree()
From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e = r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-frontends/s5h1432.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/dvb-frontends/s5h1432.c b/drivers/media/dvb-frontends/s5h1432.c index 8352ce1..6ec16a2 100644 --- a/drivers/media/dvb-frontends/s5h1432.c +++ b/drivers/media/dvb-frontends/s5h1432.c @@ -351,8 +351,8 @@ struct dvb_frontend *s5h1432_attach(const struct s5h1432_config *config, printk(KERN_INFO Enter s5h1432_attach(). attach success!\n); /* allocate memory for the internal state */ state = kmalloc(sizeof(struct s5h1432_state), GFP_KERNEL); - if (state == NULL) - goto error; + if (!state) + return NULL; /* setup the state */ state-config = config; @@ -367,10 +367,6 @@ struct dvb_frontend *s5h1432_attach(const struct s5h1432_config *config, state-frontend.demodulator_priv = state; return state-frontend; - -error: - kfree(state); - return NULL; } EXPORT_SYMBOL(s5h1432_attach); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 4/8] drivers/media/dvb-frontends/s921.c: Removes useless kfree()
From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e = r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-frontends/s921.c |9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/media/dvb-frontends/s921.c b/drivers/media/dvb-frontends/s921.c index cd2288c..a271ac3 100644 --- a/drivers/media/dvb-frontends/s921.c +++ b/drivers/media/dvb-frontends/s921.c @@ -487,9 +487,9 @@ struct dvb_frontend *s921_attach(const struct s921_config *config, kzalloc(sizeof(struct s921_state), GFP_KERNEL); dprintk(\n); - if (state == NULL) { + if (!state) { rc(Unable to kzalloc\n); - goto rcor; + return NULL; } /* setup the state */ @@ -502,11 +502,6 @@ struct dvb_frontend *s921_attach(const struct s921_config *config, state-frontend.demodulator_priv = state; return state-frontend; - -rcor: - kfree(state); - - return NULL; } EXPORT_SYMBOL(s921_attach); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 5/8] drivers/media/dvb-frontends/stb6100.c: Removes useless kfree()
From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e = r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-frontends/stb6100.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/dvb-frontends/stb6100.c b/drivers/media/dvb-frontends/stb6100.c index 2e93e65..45f9523 100644 --- a/drivers/media/dvb-frontends/stb6100.c +++ b/drivers/media/dvb-frontends/stb6100.c @@ -575,8 +575,8 @@ struct dvb_frontend *stb6100_attach(struct dvb_frontend *fe, struct stb6100_state *state = NULL; state = kzalloc(sizeof (struct stb6100_state), GFP_KERNEL); - if (state == NULL) - goto error; + if (!state) + return NULL; state-config = config; state-i2c = i2c; @@ -587,10 +587,6 @@ struct dvb_frontend *stb6100_attach(struct dvb_frontend *fe, printk(%s: Attaching STB6100 \n, __func__); return fe; - -error: - kfree(state); - return NULL; } static int stb6100_release(struct dvb_frontend *fe) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 6/8] drivers/media/dvb-frontends/tda665x.c: Removes useless kfree()
From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e = r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-frontends/tda665x.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/dvb-frontends/tda665x.c b/drivers/media/dvb-frontends/tda665x.c index 2c1c759..63cc123 100644 --- a/drivers/media/dvb-frontends/tda665x.c +++ b/drivers/media/dvb-frontends/tda665x.c @@ -228,8 +228,8 @@ struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe, struct dvb_tuner_info *info; state = kzalloc(sizeof(struct tda665x_state), GFP_KERNEL); - if (state == NULL) - goto exit; + if (!state) + return NULL; state-config = config; state-i2c = i2c; @@ -246,10 +246,6 @@ struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe, printk(KERN_DEBUG %s: Attaching TDA665x (%s) tuner\n, __func__, info-name); return fe; - -exit: - kfree(state); - return NULL; } EXPORT_SYMBOL(tda665x_attach); -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 7/8] drivers/media/platform/davinci/vpbe.c: Removes useless kfree()
From: Peter Senna Tschudin peter.se...@gmail.com Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e = r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/platform/davinci/vpbe.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index c4a82a1..1125a87 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -771,7 +771,6 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) return 0; vpbe_fail_amp_register: - kfree(vpbe_dev-amp); vpbe_fail_sd_register: kfree(vpbe_dev-encoders); vpbe_fail_v4l2_device: -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 7/8] drivers/media/platform/davinci/vpbe.c: Removes useless kfree()
Marcos, Now that you removed this kfree, you could remove this label too. Very nice your cleanup :) Thanks! vpbe_fail_sd_register: kfree(vpbe_dev-encoders); vpbe_fail_v4l2_device: The problem removing the label is that it will require some more work naming the labels. See: if (!vpbe_dev-amp) { ... goto vpbe_fail_amp_register; If I just remove the label vpbe_fail_amp_register, the label names will not make sense any more as the next label is vpbe_fail_sd_register. So I will need to change the name to something different or rename all labels to out1, out2, out3 or err1, err2, err3, or Any suggestions? -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] drivers/media: Removes useless kfree()
From: Peter Senna Tschudin peter.se...@gmail.com The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e = r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/dvb-frontends/dvb_dummy_fe.c | 21 ++--- drivers/media/dvb-frontends/lg2160.c |1 - drivers/media/dvb-frontends/s5h1432.c |6 +- drivers/media/dvb-frontends/s921.c |7 +-- drivers/media/dvb-frontends/stb6100.c |6 +- drivers/media/dvb-frontends/tda665x.c |6 +- drivers/media/platform/davinci/vpbe.c |1 - drivers/media/tuners/mt2063.c |6 +- 8 files changed, 11 insertions(+), 43 deletions(-) diff --git a/drivers/media/dvb-frontends/dvb_dummy_fe.c b/drivers/media/dvb-frontends/dvb_dummy_fe.c index dcfc902..465068f 100644 --- a/drivers/media/dvb-frontends/dvb_dummy_fe.c +++ b/drivers/media/dvb-frontends/dvb_dummy_fe.c @@ -121,16 +121,13 @@ struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void) /* allocate memory for the internal state */ state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); - if (state == NULL) goto error; + if (state == NULL) + return NULL; /* create dvb_frontend */ memcpy(state-frontend.ops, dvb_dummy_fe_ofdm_ops, sizeof(struct dvb_frontend_ops)); state-frontend.demodulator_priv = state; return state-frontend; - -error: - kfree(state); - return NULL; } static struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops; @@ -141,16 +138,13 @@ struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void) /* allocate memory for the internal state */ state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); - if (state == NULL) goto error; + if (state == NULL) + return NULL; /* create dvb_frontend */ memcpy(state-frontend.ops, dvb_dummy_fe_qpsk_ops, sizeof(struct dvb_frontend_ops)); state-frontend.demodulator_priv = state; return state-frontend; - -error: - kfree(state); - return NULL; } static struct dvb_frontend_ops dvb_dummy_fe_qam_ops; @@ -161,16 +155,13 @@ struct dvb_frontend *dvb_dummy_fe_qam_attach(void) /* allocate memory for the internal state */ state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); - if (state == NULL) goto error; + if (state == NULL) + return NULL; /* create dvb_frontend */ memcpy(state-frontend.ops, dvb_dummy_fe_qam_ops, sizeof(struct dvb_frontend_ops)); state-frontend.demodulator_priv = state; return state-frontend; - -error: - kfree(state); - return NULL; } static struct dvb_frontend_ops dvb_dummy_fe_ofdm_ops = { diff --git a/drivers/media/dvb-frontends/lg2160.c b/drivers/media/dvb-frontends/lg2160.c index cc11260..748da5d 100644 --- a/drivers/media/dvb-frontends/lg2160.c +++ b/drivers/media/dvb-frontends/lg2160.c @@ -1451,7 +1451,6 @@ struct dvb_frontend *lg2160_attach(const struct lg2160_config *config, return state-frontend; fail: lg_warn(unable to detect LG216x hardware\n); - kfree(state); return NULL; } EXPORT_SYMBOL(lg2160_attach); diff --git a/drivers/media/dvb-frontends/s5h1432.c b/drivers/media/dvb-frontends/s5h1432.c index 8352ce1..24a8c75 100644 --- a/drivers/media/dvb-frontends/s5h1432.c +++ b/drivers/media/dvb-frontends/s5h1432.c @@ -352,7 +352,7 @@ struct dvb_frontend *s5h1432_attach(const struct s5h1432_config *config, /* allocate memory for the internal state */ state = kmalloc(sizeof(struct s5h1432_state), GFP_KERNEL); if (state == NULL) - goto error; + return NULL; /* setup the state */ state-config = config; @@ -367,10 +367,6 @@ struct dvb_frontend *s5h1432_attach(const struct s5h1432_config *config, state-frontend.demodulator_priv = state; return state-frontend; - -error: - kfree(state); - return NULL; } EXPORT_SYMBOL(s5h1432_attach); diff --git a/drivers/media/dvb-frontends/s921.c b/drivers/media/dvb-frontends/s921.c index
Re: [PATCH v2] drivers/media/pci/cx25821/cx25821-video-upstream-ch2.c: fix error return code
You're replacing kmemdup for kstrdup, which is great, but that's not anywhere in the commit message. Sorry for that. I'm not sure if you should re-send, but you should definitely try to have better commit messages in the future! I'll kindly ask to ignore the V2 of this patch. I'll send other patch to be applied after the V1. The second patch will replace kmemdup for kstrdup. Please ignore the patch: http://patchwork.linuxtv.org/patch/14237/ Not to mention you're doing two things in one patch, and that makes very difficult to bisect. This is really bad thing to do in a single patch. Sorry for that too. Thanks (and sorry for the nitpick)... Thanks! Ezequiel. -- Peter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html