summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/cx231xx
Commit message (Collapse)AuthorAgeFilesLines
* [media] v4l: subdev: Move [gs]_std operation to video opsLaurent Pinchart2014-05-242-4/+4
| | | | | | | | | | | | The g_std and s_std operations are video-related, move them to the video ops where they belong. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* Merge branch 'v4l_for_linus' of ↵Linus Torvalds2014-04-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "The main set of series of patches for media subsystem, including: - document RC sysfs class - added an API to setup scancode to allow waking up systems using the Remote Controller - add API for SDR devices. Drivers are still on staging - some API improvements for getting EDID data from media inputs/outputs - new DVB frontend driver for drx-j (ATSC) - one driver (it913x/it9137) got removed, in favor of an improvement on another driver (af9035) - added a skeleton V4L2 PCI driver at documentation - added a dual flash driver (lm3646) - added a new IR driver (img-ir) - added an IR scancode decoder for the Sharp protocol - some improvements at the usbtv driver, to allow its core to be reused. - added a new SDR driver (rtl2832u_sdr) - added a new tuner driver (msi001) - several improvements at em28xx driver to fix PM support, device removal and to split the V4L2 specific bits into a separate sub-driver - one driver got converted to videobuf2 (s2255drv) - the e4000 tuner driver now follows an improved binding model - some fixes at V4L2 compat32 code - several fixes and enhancements at videobuf2 code - some cleanups at V4L2 API documentation - usual driver enhancements, new board additions and misc fixups" [ NOTE! This merge effective drops commit 4329b93b283c ("of: Reduce indentation in of_graph_get_next_endpoint"). The of_graph_get_next_endpoint() function was moved and renamed by commit fd9fdb78a9bf ("[media] of: move graph helpers from drivers/media/v4l2-core to drivers/of"). It was originally called v4l2_of_get_next_endpoint() and lived in the file drivers/media/v4l2-core/v4l2-of.c. In that original location, it was then fixed to support empty port nodes by commit b9db140c1e46 ("[media] v4l: of: Support empty port nodes"), and that commit clashes badly with the dropped "Reduce intendation" commit. I had to choose one or the other, and decided that the "Support empty port nodes" commit was more important ] * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (426 commits) [media] em28xx-dvb: fix PCTV 461e tuner I2C binding Revert "[media] em28xx-dvb: fix PCTV 461e tuner I2C binding" [media] em28xx: fix PCTV 290e LNA oops [media] em28xx-dvb: fix PCTV 461e tuner I2C binding [media] m88ds3103: fix bug on .set_tone() [media] saa7134: fix WARN_ON during resume [media] v4l2-dv-timings: add module name, description, license [media] videodev2.h: add parenthesis around macro arguments [media] saa6752hs: depends on CRC32 [media] si4713: fix Kconfig dependencies [media] Sensoray 2255 uses videobuf2 [media] adv7180: free an interrupt on failure paths in init_device() [media] e4000: make VIDEO_V4L2 dependency optional [media] af9033: Don't export functions for the hardware filter [media] af9035: use af9033 PID filters [media] af9033: implement PID filter [media] rtl2832_sdr: do not use dynamic stack allocation [media] e4000: fix 32-bit build error [media] em28xx-audio: make sure audio is unmuted on open() [media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_format ...
| * [media, edac] Change my email addressMauro Carvalho Chehab2014-02-071-1/+1
| | | | | | | | | | | | | | | | There are several left overs with my old email address. Remove their occurrences and add myself at CREDITS, to allow people to be able to reach me on my new addresses. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] Convert to snd_card_new() with a device pointerTakashi Iwai2014-02-141-3/+2Star
|/ | | | | | Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [media] cx231xx: add support for a CX23103 Video Grabber USBLinks (Markus)2014-01-071-0/+2
| | | | | | | Add a new USB ID to the driver. Signed-off-by: Links (Markus) <help.markus+git@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] cx231xx: Add missing KERN_CONT to i2c debug printsMatthias Schwarzott2014-01-071-5/+6
| | | | | | | | | | | Fix continuation lines. [m.chehab@samsung.com: This was actually part of a v2 patch meant to fix i2c debug prints. As version 1 was already applied, I'm applying here the diff and fixing the patch subject/description] Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] cx231xx: fix i2c debug printsMatthias Schwarzott2014-01-071-4/+12
| | | | | | | | | | | Do not shift the already 7bit i2c address. Print a message also for write+read transactions. For write+read, print the read buffer correctly instead of using the write buffer. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] cx231xx: Add missing selects for MEDIA_SUBDRV_AUTOSELECTMatthias Schwarzott2014-01-071-0/+2
| | | | | | | | | The two drivers LGDT3305 and TDA18271C2DD were not autoselected, so the cx231xx_dvb module could not be loaded when MEDIA_SUBDRV_AUTOSELECT=y. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] cx231xx: use after free on error path in probeDan Carpenter2013-11-291-1/+1
| | | | | | | | | We dereference "dev" after it has already been freed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] cx231xx: fix double free and leaks on failure path in ↵Alexey Khoroshilov2013-10-171-53/+57
| | | | | | | | | | | | | | | | | | cx231xx_usb_probe() There are numerous issues in error handling code of cx231xx initialization. Double free (when cx231xx_init_dev() calls kfree(dev) via cx231xx_release_resources() and then cx231xx_usb_probe() does the same) and memory leaks (e.g. usb_get_dev() before (ifnum != 1) check in cx231xx_usb_probe()) are just a few of them. The patch fixes the issues in cx231xx_usb_probe() and cx231xx_init_dev() by moving usb_get_dev(interface_to_usbdev(interface)) below in code and implementing proper error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] cx231xx: fix sparse warningsHans Verkuil2013-10-151-2/+2
| | | | | | | | drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:31:19: warning: symbol 'cx231xx_Scenario' was not declared. Should it be static? drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:675:23: warning: cast to restricted __le32 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] cx231xx: Add support for KWorld UB445-UJohannes Erdfelt2013-08-233-0/+42
| | | | | | | | | The KWorld UB445-U is similar to the UB430-AF but with a Samsung S5H1411 frontend. Luckily all of the hardware is already well supported, just the device and USB ids need to be added to get it to work. Signed-off-by: Johannes Erdfelt <johannes@erdfelt.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] cx231xx: the reg->size field wasn't filled inHans Verkuil2013-06-171-0/+7
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: remove g_chip_identHans Verkuil2013-06-176-320/+103Star
| | | | | | | Remove g_chip_ident and replace it with g_chip_info. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: add const to argument of write-only s_register ioctlHans Verkuil2013-03-242-2/+2
| | | | | | | | | This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: pass std by value to the write-only s_std ioctlHans Verkuil2013-03-242-5/+5
| | | | | | | | | | | | | This ioctl is defined as IOW, so pass the argument by value instead of by reference. I could have chosen to add const instead, but this is 1) easier to handle in drivers and 2) consistent with the s_std subdev operation. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: add const to argument of write-only s_tuner ioctlHans Verkuil2013-03-242-3/+3
| | | | | | | | | This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: add const to argument of write-only s_frequency ioctlHans Verkuil2013-03-242-4/+5
| | | | | | | This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx : Add support for OTG102 aka EZGrabber2Matt Gomboc2013-03-183-0/+38
| | | | | | | | | | Thanks for the response, I have done as you suggested. Below is an updated patch for the OTG102 device against http://git.linuxtv.org/hverkuil/media_tree.git/shortlog/refs/heads/cx231xx, kernel version 3.8. With further testing it appears the extra clauses in cx231xx-cards.c were not necessary (in static in cx231xx_init_dev and static int cx231xx_usb_probe), so those have been also been removed. Signed-off-by: Matt Gomboc <gomboc0@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media/usb: cx231xx-pcb-cfg.h: Remove unused enum _true_falseThiago Farina2013-03-141-5/+0Star
| | | | | Signed-off-by: Thiago Farina <tfarina@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: fix undefined function cx231xx_g_chip_ident()Gianluca Gennari2013-03-141-1/+1
| | | | | | | | | | | | | This patch: http://git.linuxtv.org/media_tree.git/commit/b86d15440b683f8634c0cb26fc0861a5bc4913ac is missing a chunk when compared to an older version: https://patchwork.kernel.org/patch/2063281/ probably because of an unresolved merging conflict. This causes the following error: WARNING: "cx231xx_g_chip_ident" [/home/jena/media_build/v4l/cx231xx.ko] undefined! Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: fix gpio big-endian problemsHans Verkuil2013-03-052-37/+38
| | | | | | | Tested on my big-endian ppc-based test machine. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: fix big-endian problemsHans Verkuil2013-03-055-16/+16
| | | | | | | Tested on my big-endian ppc-based test machine. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: don't use port 3 on the Conexant video grabberHans Verkuil2013-03-051-0/+1
| | | | | | | It's not working reliably if port 3 is enabled. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: don't reset width/height on first openHans Verkuil2013-03-051-3/+0Star
| | | | | | | The last set width/height must be preserved as per the spec. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: disable 417 support from the Conexant video grabberHans Verkuil2013-03-051-1/+4
| | | | | | | | | | | | The 417 support doesn't work. Until someone can dig into this driver to figure out why it isn't working the 417 support is disabled. Sometimes you can actually stream a bit, but very soon the whole machine crashes, so something is seriously wrong. For the record, this was not introduced by my recent changes to this driver, it was broken before that. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: remove bogus driver prefix in log messagesHans Verkuil2013-03-051-14/+11Star
| | | | | | | The prefix is generated automatically, so no need to provide it again. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx-417: convert to the control frameworkHans Verkuil2013-03-052-129/+86Star
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx-417: share ioctls with cx231xx-videoHans Verkuil2013-03-053-114/+68Star
| | | | | | | | | | Share tuner, frequency, debug and input ioctls with cx231xx-video. These are all shared resources, so no need to implement them again. [mchehab@redhat.com: Fix merge conflict and a checkpatch issue] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx-417: checkpatch cleanupsHans Verkuil2013-03-051-372/+360Star
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx-417: fix g/try_fmt compliance problemsHans Verkuil2013-03-051-15/+19
| | | | | | | | | Colorspace, field and priv were not set, and sizeimage was calculated using the wrong values (dev->ts1.ts_packet_size and dev->ts1.ts_packet_count can be 0 at module load). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx-417: use one querycap for all device nodesHans Verkuil2013-03-053-22/+6Star
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx-417: remove empty functionsHans Verkuil2013-03-051-67/+1Star
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: improve std handlingHans Verkuil2013-03-051-11/+13
| | | | | | | | | | Set the initial standard of subdevices instead of leaving it undefined. Also update the width and height when a new standard is chosen and return -EBUSY when attempting to change the standard while videobuf is busy. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: get rid of a bunch of unused cx231xx_fh fieldsHans Verkuil2013-03-052-22/+2Star
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: replace ioctl by unlocked_ioctlHans Verkuil2013-03-052-10/+7Star
| | | | | | | | | There was already a core lock, so why wasn't ioctl already replaced by unlock_ioctl? This patch switches to unlocked_ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: remove current_norm usageHans Verkuil2013-03-052-3/+1Star
| | | | | | | | | The use of this field is deprecated since it will not work when multiple device nodes reference the same video input (the video and vbi nodes in this case). The norm field should be a device-global value. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: add struct v4l2_fh to get prio and event supportHans Verkuil2013-03-052-5/+28
| | | | | | | Required to resolve v4l2-compliance failures. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: convert to the control frameworkHans Verkuil2013-03-054-236/+27Star
| | | | | | | | This is needed to resolve the v4l2-compliance complaints about the control ioctls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: fix vbi compliance issuesHans Verkuil2013-03-051-50/+17Star
| | | | | | | | Various v4l2-compliance fixes: remove unused sliced VBI functions, zero the reserved fields of struct v4l2_vbi_format and implement the missing s_fmt_vbi_cap. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: fix frequency clampingHans Verkuil2013-03-051-9/+2Star
| | | | | | | | Let the tuner clamp the frequency and store that clamped value. This fixes a v4l2_compliance failure. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: zero priv field and use right width in try_fmtHans Verkuil2013-03-051-1/+3
| | | | | | | | The priv field of v4l2_pix_format must be zeroed. Also fix a bug in try_fmt where the current width was used instead of the width passed to try_fmt. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: fix tuner compliance issuesHans Verkuil2013-03-052-1/+5
| | | | | | | | | | The g_tuner call wasn't passed on to the subdevices, g_frequency didn't check for invalid tuners and a low-level function that was expected to return 0 or a negative error returned a positive number instead, causing s_frequency to return bogus errors. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: remove broken audio input support from the driverHans Verkuil2013-03-051-44/+8Star
| | | | | | | | | | The audio selection code is broken. Audio and video indices were mixed up and s_audio would reject changing the audio input to something else anyway, so what's the point? All the audio input code has been removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: clean up radio supportHans Verkuil2013-03-051-61/+18Star
| | | | | | | | | Radio should not use video or audio inputs. In addition, fix a bug in radio_g_tuner where s_tuner was called in the tuner subdev instead of g_tuner. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: add required VIDIOC_DBG_G_CHIP_IDENT supportHans Verkuil2013-03-051-0/+14
| | | | | | | | | This fixes a v4l2_compliance failure. [mchehab@redhat.com: CodingStyle fixes] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: add device_caps support to QUERYCAPHans Verkuil2013-03-051-6/+10
| | | | | | | This fixes a v4l2_compliance failure. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: Improve signal reception for PV SBTVDMauro Carvalho Chehab2013-03-041-2/+2
| | | | | | | | | | | | | | | | Instead of using 3.3 MHz IF, use 4MHz. That's the standard value for the demod, and, while it can be adjusted, 3.3 MHz is out of the recommended range. So, let's stick with the default. With regards to the IF voltage level, instead of using 0.5 V(p-p) for IF, use 2V, giving a 12dB gain. The rationale is that, on PixelView SBTVD Hybrid, even 2V(p-p) would be in the nominal range for IF, as the maximum range on this particular device is 3V. A higher gain here should help to improve reception under weak signals. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: add a missing break statementDan Carpenter2013-02-051-0/+1
| | | | | | | | My static checker complains about the fall through here. From the context it looks like we should add a break statement. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: Replace memcpy with struct assignmentEzequiel Garcia2012-12-272-3/+2Star
| | | | | | | | | | | | | | | | | | | | | | | This kind of memcpy() is error-prone. Its replacement with a struct assignment is prefered because it's type-safe and much easier to read. Found by coccinelle. Hand patched and reviewed. Tested by compilation only. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier struct_name; struct struct_name to; struct struct_name from; expression E; @@ -memcpy(&(to), &(from), E); +to = from; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>