aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2011-03-22drivers/misc/bmp085.c: free initmem memoryShubhrajyoti Datta1-3/+3
Free the memory that is used only at init Signed-off-by: Shubhrajyoti Datta <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22bh1780gli: convert to dev pm opsShubhrajyoti Datta1-9/+10
Signed-off-by: Shubhrajyoti Datta <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22pwm_backlight: add check_fb() hookRobert Morell1-0/+11
In systems with multiple framebuffer devices, one of the devices might be blanked while another is unblanked. In order for the backlight blanking logic to know whether to turn off the backlight for a particular framebuffer's blanking notification, it needs to be able to check if a given framebuffer device corresponds to the backlight. This plumbs the check_fb hook from core backlight through the pwm_backlight helper to allow platform code to plug in a check_fb hook. Signed-off-by: Robert Morell <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Arun Murthy <[email protected]> Cc: Linus Walleij <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22drivers/video/backlight/jornada720_*.c: make needlessly global symbols staticAxel Lin2-4/+4
The following symbols are needlessly defined global: jornada_bl_init, jornada_bl_exit, jornada_lcd_init, jornada_lcd_exit. Make them static. Signed-off-by: Axel Lin <[email protected]> Acked-by: Kristoffer Ericson <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22backlight: apple_bl depends on ACPIRandy Dunlap1-2/+2
apple_bl uses ACPI interfaces (data & code), so it should depend on ACPI. drivers/video/backlight/apple_bl.c:142: warning: 'struct acpi_device' declared inside parameter list drivers/video/backlight/apple_bl.c:142: warning: its scope is only this definition or declaration, which is probably not what you want drivers/video/backlight/apple_bl.c:201: warning: 'struct acpi_device' declared inside parameter list drivers/video/backlight/apple_bl.c:215: error: variable 'apple_bl_driver' has initializer but incomplete type drivers/video/backlight/apple_bl.c:216: error: unknown field 'name' specified in initializer ... Signed-off-by: Randy Dunlap <[email protected]> Acked-by: Matthew Garrett <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22mbp_nvidia_bl: rename to apple_blMatthew Garrett3-34/+35
It works on hardware other than Macbook Pros, and it works on GPUs other than Nvidia. It should even work on iMacs, so change the name to match reality more precisely and include an alias so existing users don't get confused. Signed-off-by: Matthew Garrett <[email protected]> Acked-by: Richard Purdie <[email protected]> Cc: Mourad De Clerck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22mbp_nvidia_bl: check that the backlight control functionsMatthew Garrett1-0/+13
The SMI-based backlight control functionality may fail to work if the system is running under EFI rather than BIOS. Check that the hardware responds as expected, and exit if it doesn't. Signed-off-by: Matthew Garrett <[email protected]> Acked-by: Richard Purdie <[email protected]> Cc: Mourad De Clerck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22mbp_nvidia_bl: remove DMI dependencyMatthew Garrett3-275/+101
This driver only has to deal with two different classes of hardware, but right now it needs new DMI entries for every new machine. It turns out that there's an ACPI device that uniquely identifies Apples with backlights, so this patch reworks the driver into an ACPI one, identifies the hardware by checking the PCI vendor of the root bridge and strips out all the DMI code. It also changes the config text to clarify that it works on devices other than Macbook Pros and GPUs other than nvidia. Signed-off-by: Matthew Garrett <[email protected]> Acked-by: Richard Purdie <[email protected]> Cc: Mourad De Clerck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22acpi: tie ACPI backlight devices to PCI devices if possibleMatthew Garrett1-1/+14
Dual-GPU machines may provide more than one ACPI backlight interface. Tie the backlight device to the GPU in order to allow userspace to identify the correct interface. Signed-off-by: Matthew Garrett <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Chris Wilson <[email protected]> Cc: David Airlie <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Zhang Rui <[email protected]> Cc: Len Brown <[email protected]> Cc: Jesse Barnes <[email protected]> Tested-by: Sedat Dilek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22nouveau: change the backlight parent device to the connector, not the PCI devMatthew Garrett4-20/+27
We may eventually end up with per-connector backlights, especially with ddcci devices. Make sure that the parent node for the backlight device is the connector rather than the PCI device. Signed-off-by: Matthew Garrett <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Chris Wilson <[email protected]> Cc: David Airlie <[email protected]> Cc: Alex Deucher <[email protected]> Acked-by: Ben Skeggs <[email protected]> Cc: Zhang Rui <[email protected]> Cc: Len Brown <[email protected]> Cc: Jesse Barnes <[email protected]> Tested-by: Sedat Dilek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22radeon: expose backlight class device for legacy LVDS encoderMichel Dänzer4-6/+273
Allows e.g. power management daemons to control the backlight level. Inspired by the corresponding code in radeonfb. [[email protected]: updated to add backlight type and make the connector the parent device] Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Chris Wilson <[email protected]> Cc: David Airlie <[email protected]> Acked-by: Alex Deucher <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Zhang Rui <[email protected]> Cc: Len Brown <[email protected]> Cc: Jesse Barnes <[email protected]> Tested-by: Sedat Dilek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22backlight: add backlight typeMatthew Garrett57-2/+82
There may be multiple ways of controlling the backlight on a given machine. Allow drivers to expose the type of interface they are providing, making it possible for userspace to make appropriate policy decisions. Signed-off-by: Matthew Garrett <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Chris Wilson <[email protected]> Cc: David Airlie <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Zhang Rui <[email protected]> Cc: Len Brown <[email protected]> Cc: Jesse Barnes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22drivers/leds/leds-lp5523.c: world-writable engine* sysfs filesVasiliy Kulikov1-10/+10
Don't allow everybody to change LED settings. Signed-off-by: Vasiliy Kulikov <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22drivers/leds/leds-lp5521.c: world-writable sysfs engine* filesVasiliy Kulikov1-7/+7
Don't allow everybody to change LED settings. Signed-off-by: Vasiliy Kulikov <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22drivers/vidfeo/backlight: ld9040 amoled driver supportDonghwa Lee4-0/+1028
Add a ld9040 amoled panel driver. Signed-off-by: Donghwa Lee <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Inki Dae <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22leds: make *struct gpio_led_platform_data.leds constUwe Kleine-König1-1/+1
And fix a typo. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22leds: add driver for LM3530 ALSShreshtha Kumar Sahu3-0/+389
Simple backlight driver for National Semiconductor LM3530. Presently only manual mode is supported, PWM and ALS support to be added. Signed-off-by: Shreshtha Kumar Sahu <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22leds: convert bd2802 driver to dev_pm_opsMark Brown1-19/+28
There is a move to deprecate bus-specific PM operations and move to using dev_pm_ops instead in order to reduce the amount of boilerplate code in buses and facilitiate updates to the PM core. Do this move for the bs2802 driver. [[email protected]: fix warnings] Signed-off-by: Mark Brown <[email protected]> Cc: Kim Kyuwon <[email protected]> Cc: Kim Kyuwon <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-clientLinus Torvalds1-26/+335
* git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: use watch/notify for changes in rbd header libceph: add lingering request and watch/notify event framework rbd: update email address in Documentation ceph: rename dentry_release -> d_release, fix comment ceph: add request to the tail of unsafe write list ceph: remove request from unsafe list if it is canceled/timed out ceph: move readahead default to fs/ceph from libceph ceph: add ino32 mount option ceph: update common header files ceph: remove debugfs debug cruft libceph: fix osd request queuing on osdmap updates ceph: preserve I_COMPLETE across rename libceph: Fix base64-decoding when input ends in newline.
2011-03-22tty: stop using "delayed_work" in the tty layerLinus Torvalds2-14/+14
Using delayed-work for tty flip buffers ends up causing us to wait for the next tick to complete some actions. That's usually not all that noticeable, but for certain latency-critical workloads it ends up being totally unacceptable. As an extreme case of this, passing a token back-and-forth over a pty will take two ticks per iteration, so even just a thousand iterations will take 8 seconds assuming a common 250Hz configuration. Avoiding the whole delayed work issue brings that ping-pong test-case down to 0.009s on my machine. In more practical terms, this latency has been a performance problem for things like dive computer simulators (simulating the serial interface using the ptys) and for other environments (Alan mentions a CP/M emulator). Reported-by: Jef Driesen <[email protected]> Acked-by: Greg KH <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22[media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_tPawel Osciak1-1/+1
dma_addr_t may not fit into void* on some architectures. To be safe, make vb2_dma_contig_cookie() return a pointer to dma_addr_t and dereference it in vb2_dma_contig_plane_paddr() back to dma_addr_t. Signed-off-by: Pawel Osciak <[email protected]> Reported-by: Hans Verkuil <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] sh_mobile_ceu_camera: Do not call vb2's mem_ops directlyPawel Osciak1-3/+1
Use vb2_dma_contig_plane_paddr to retrieve a physical address for a plane instead of calling an internal mem_ops callback. Signed-off-by: Pawel Osciak <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] V4L: soc-camera: explicitly require V4L2_BUF_TYPE_VIDEO_CAPTUREGuennadi Liakhovetski1-4/+12
The soc-camera core accesses the "pix" member of the struct v4l2_format::fmt union, which is only valid for V4L2_BUF_TYPE_VIDEO_CAPTURE streams. This patch adds explicit checks for this to {g,s,try}_fmt methods. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] v4l: soc-camera: Store negotiated buffer settingsSergio Aguirre1-5/+4
This fixes the problem in which a host driver sets a personalized sizeimage or bytesperline field, and gets ignored when doing G_FMT. Signed-off-by: Sergio Aguirre <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] rc: interim support for 32-bit NEC-ish scancodesJarod Wilson1-2/+8
The Apple and TiVo remotes I've got use an NEC-ish protocol, but rather than a command/not_command pair, they have what appear to be vendor ID bytes. This change makes the NEC decoder warn if the command/not_command checksum fails, but then passes along a full 32-bit scancode for keymap lookup. This change should make no difference for existing keymaps, since they simply won't have 32-bit scancodes, but allows for a 32-bit keymap. At the moment, that'll have to be uploaded by the user, but I've got Apple and TiVo remote keymaps forthcoming. In the long run (2.6.40, hopefully), we should probably just always use all 32 bits for all NEC keymaps, but this should get us by for 2.6.39. (Note that a few of the TiVo keys actuallly *do* pass the command checksum, so for now, the keymap for this remote will have to be a mix of 24-bit and 32-bit scancodes, but so be it). Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] mceusb: topseed 0x0011 needs gen3 init for tx to workJarod Wilson1-1/+1
Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] lirc_zilog: error out if buffer read bytes != chunk sizeJarod Wilson1-1/+7
Give it a few tries, then exit. Prevents a possible endless loop situation. Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] lirc: silence some compile warningsJarod Wilson2-2/+2
Both lirc_imon and lirc_sasem were causing gcc to complain about the possible use of uninitialized variables. Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] hdpvr: use same polling interval as other OSJarod Wilson1-1/+2
The hdpvr's IR part, in short, sucks. As observed with a usb traffic sniffer, the Windows software for it uses a polling interval of 405ms. Its still not behaving as well as I'd like even with this change, but this inches us closer and closer to that point... Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] ir-kbd-i2c: pass device code w/key in hauppauge caseJarod Wilson1-1/+1
The new hauppauge key tables use both device code button code. Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] rc/keymaps: Remove the obsolete rc-rc5-tv keymapMauro Carvalho Chehab4-98/+3
This keymap were used for the Hauppauge Black remote controller only. It also contains some keycodes not found there. As the Hauppauge Black is now part of the hauppauge keymap, just remove it. Also, remove the modprobe hacks to select between the Gray and the Black versions of the remote controller as: - Both are supported by default by the keymap; - If the user just wants one keyboard supported, it is just a matter of changing the keymap via the userspace tool (ir-keytable), removing the keys that he doesn't desire. As ir-keytable auto-loads the keys via udev, this is better than obscure modprobe parameters. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] remove the old RC_MAP_HAUPPAUGE_NEW RC mapMauro Carvalho Chehab11-117/+25
The rc-hauppauge-new map is a messy thing, as it bundles 3 different remote controllers as if they were just one, discarding the address byte. Also, some key maps are wrong. With the conversion to the new rc-core, it is likely that most of the devices won't be working properly, as the i2c driver and the raw decoders are now providing 16 bits for the remote, instead of just 8. delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] rc/keymaps: Rename Hauppauge table as rc-hauppaugeMauro Carvalho Chehab6-9/+15
There are two "hauppauge-new" keymaps, one with protocol unknown, and the other with the protocol marked accordingly. However, both tables are miss-named. Also, the old rc-hauppauge-new is broken, as it mixes three different controllers as if they were just one. This patch solves half of the problem by renaming the correct keycode table as just rc-hauppauge. This table contains the codes for the four different types of remote controllers found on Hauppauge cards, properly mapped with their different addresses. create mode 100644 drivers/media/rc/keymaps/rc-hauppauge.c delete mode 100644 drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c [Jarod: fix up RC_MAP_HAUPPAUGE defines] Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mappingMauro Carvalho Chehab1-41/+47
The keys for the old black were messed with the ones for the hauppauge grey. Fix it. Also, fixes some keycodes and order the keys according with the way they appear inside the remote controller. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] rc-rc5-hauppauge-new: Add support for the old Black RCMauro Carvalho Chehab1-1/+35
Hans borrowed me an old Black Hauppauge RC. Thanks to that, we can fix the RC5 table for Hauppauge. Thanks-to: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] rc-rc5-hauppauge-new: Add the old control to the tableMauro Carvalho Chehab1-1/+55
Adds the old grey remote controller to Hauppauge table. Hans borrowed me an old gray Hauppauge RC. Thanks to that, we can fix the RC5 table for Hauppauge. Thanks-to: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] rc-winfast: Fix the keycode tablesMauro Carvalho Chehab1-11/+11
One of the remotes has a picture available at: http://lirc.sourceforge.net/remotes/leadtek/Y04G0004.jpg As there's one variant with a set direction keys plus vol/chann keys, and the same table is used for both models, change it to represent all keys, avoiding the usage of weird function keys. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] a800: Fix a few wrong IR key assignmentsMauro Carvalho Chehab1-4/+4
Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] opera1: Use multimedia keys instead of an app-specific mappingMauro Carvalho Chehab1-17/+16
This driver uses an app-specific keymap for one of the tables. This is wrong. Instead, use the standard keycodes. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] dw2102: Use multimedia keys instead of an app-specific mappingMauro Carvalho Chehab1-20/+20
This driver uses an app-specific keymap for one of the tables. This is wrong. Instead, use the standard keycodes. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] rc/keymaps: Use KEY_LEFTMETA were pertinentMauro Carvalho Chehab4-4/+4
Using xev and testing the "Windows" key on a normal keyboard, it is mapped as KEY_LEFTMETA. So, as this is the standard code for it, use it, instead of a generic, meaningless KEY_PROG1. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] rc/keymaps: Fix most KEY_PROG[n] keycodesMauro Carvalho Chehab4-6/+6
Those KEY_PROG[n] keys were used on places where the developer didn't know for sure what key should be used. On several cases, using KEY_RED, KEY_GREEN, KEY_YELLOW would be enough. On others, there are specific keys for that already. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] rc/keymaps: Use KEY_VIDEO for Video SourceMauro Carvalho Chehab17-22/+22
Each keyboard map were using a different definition for the Source/Video Source key. Behold Columbus were the only one using KEY_PROPS. As we want to standardize those keys at X11 and at userspace applications, we need to use just one code for it. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] rc/keymaps: use KEY_CAMERA for snapshotsMauro Carvalho Chehab8-8/+9
On a few places, KEY_MHP were used for snapshots. However, KEY_CAMERA is used for it on all the other keyboards that have a snapshot/Picture button. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jarod Wilson <[email protected]>
2011-03-22[media] lirc_zilog: Update TODO list based on work completed and revised plansAndy Walls1-26/+25
Update the TODO.lirc_zilog based on what has been completed. Also revised the development plan for lirc_zilog to not try and split Tx/Rx for one IR transceiver unit between lirc_zilog and ir-kbd-i2c, since that would be a ref-counting nightmare. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] lirc_zilog: Fix somewhat confusing information messages in ir_probe()Andy Walls1-1/+3
The total sequence of messages emitted by the ir_porbe() calls for a transceiver's two i2c_clients was confusing. Clean it up a bit. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] lirc_zilog: Add locking of the i2c_clients when in useAndy Walls1-4/+37
Lock the i2c_client pointers and prevent i2c_client removal when lirc_zilog is perfoming a series of operations that require valid i2c_client pointers. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] lirc_zilog: Add ref counting of struct IR, IR_tx, and IR_rxAndy Walls1-204/+380
This is a major change to add pointer reference counting for struct IR, struct IR_tx, and struct IR_rx object instances. This ref counting gets lirc_zilog closer to gracefully handling bridge drivers and hot-unplugged USB devices disappearing out from under lirc_zilog when the /dev/lircN node is still open. (mutexes to protect the i2c_client pointers in struct IR_tx and struct IR_rx still need to be added.) This reference counting also helps lirc_zilog clean up properly when the i2c_clients disappear. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] lirc_zilog: Move constants from ir_probe() into the lirc_driver templateAndy Walls1-12/+15
ir_probe() makes a number of constant assignments into the lirc_driver object after copying in a template. Make better use of the template. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2011-03-22[media] lirc_zilog: Always allocate a Rx lirc_buffer objectAndy Walls1-31/+31
Always allocate a lirc_buffer object, instead of just upon setup of the Rx i2c_client. If we do not allocate a lirc_buffer object, because we are not handling the Rx i2c_client, lirc_dev will allocate its own lirc_buffer anyway and not tell us about its location. Signed-off-by: Andy Walls <[email protected]> Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>