summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
AgeCommit message (Collapse)Author
2007-11-25pvrusb2: Implement functions to pass descriptive hardware infoMike Isely
From: Mike Isely <isely@pobox.com> Implement additional pvrusb2 device info table entries for a device identifier and a device description. Export this information via the driver's internal API. Make this information available via the sysfs driver interface. Also propagate this information into the v4l2 capability structure. An app can now retrieve and report a descriptive string about the particular type of hardware device it is operating. Signed-off-by: Mike Isely <isely@pobox.com>
2007-10-28pvrusb2: Remove dead sysfs codeMike Isely
From: Mike Isely <isely@pobox.com> The pvrusb2 driver's sysfs implementation had long since implemented a dummy hotplug function because at the time the kernel would oops without at least the empty function being present. Today - after numerous class interface changes in the kernel - this pvrusb2 change had been dutifully carried forward but an inspection of the kernel sources shows that it is no longer needed. So remove the dummy function and its reference. This also solves a recurring backwards compatibility issue in the pvrusb2 driver as the class interface has been getting thrashed in the kernel. Signed-off-by: Mike Isely <isely@pobox.com>
2007-10-17backport commit 7eff2e7a8b65c25920207324e56611150eb1cd9aMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Original Description: Author: Kay Sievers <kay.sievers@vrfy.org> Date: Tue Aug 14 15:15:12 2007 +0200 Driver core: change add_uevent_var to use a struct This changes the uevent buffer functions to use a struct instead of a long list of parameters. It does no longer require the caller to do the proper buffer termination and size accounting, which is currently wrong in some places. It fixes a known bug where parts of the uevent environment are overwritten because of wrong index calculations. Many thanks to Mathieu Desnoyers for finding bugs and improving the error handling. CC: Mike Isely <isely@isely.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-14pvrusb2: Fix broken build for 2.6.18 kernelMike Isely
From: Mike Isely <isely@pobox.com> Earlier changes to move away from use of struct class_device introduced breakage for kernels older than 2.6.19. This change at least allows it to build again for 2.6.18. Still unclear about older kernels, unfortunately :-( Signed-off-by: Mike Isely <isely@pobox.com>
2007-10-08pvrusb: Update DEBUGIFC sysfs to kernel 2.6.13+Trent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The prototypes for the show and store methods of a device_attribute changed in kernel 2.6.13, but the code in pvrusb2 was never updated. I guess the DEBUGIFC stuff isn't used much.... Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-10-08V4L: convert struct class_device to struct deviceMauro Carvalho Chehab
From: Kay Sievers <kay.sievers@vrfy.org> The currently used "struct class_device" will be removed from the kernel. Here is a patch that converts all users in drivers/media/video/ to struct device. Reviewed-by: Thierry Merle <thierry.merle@free.fr> Reviewed-by: Mike Isely <isely@pobox.com> Reviewed-by: Luca Risolia <luca.risolia@studio.unibo.it> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2007-07-02Fix v4l-dvb backward compatibilityMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Due to several internal API changes on kernel, kernel backward compatibility were lost. Basically, compat.h should be the last include for it to work properly. This patch basically reorders kernel headers to allow backward compat to work fine. Also: Some includes were added after some non-include macros, on old drivers. Better to keep all includes at the beginning of the files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-28pvrusb2: kill unnecessary attribute->ownerMike Isely
From: Tejun Heo <htejun@gmail.com> [Mike Isely: This is the pvrusb2 affected part of a much larger patch in the kernel from Tejun Heo] sysfs is now completely out of driver/module lifetime game. After deletion, a sysfs node doesn't access anything outside sysfs proper, so there's no reason to hold onto the attribute owners. Note that often the wrong modules were accounted for as owners leading to accessing removed modules. This patch kills now unnecessary attribute->owner. Note that with this change, userland holding a sysfs node does not prevent the backing module from being unloaded. For more info regarding lifetime rule cleanup, please read the following message. http://article.gmane.org/gmane.linux.kernel/510293 Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-04-07pvrusb2: Gather USB bus address info and report itMike Isely
From: Mike Isely <isely@pobox.com> The V4L2 API requires a unique bus_info string returned as part of the v4l2_capability structure. These changes gather up the USB address information, from the underlying device, into a string and report that out through v4l2 and via sysfs (for completeness). Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: Use kzalloc in place of kmalloc/memset pairsMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2007-01-19pvrusb2: A patch to use ARRAY_SIZE macro when appropriateMike Isely
From: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Mike Isely <isely@pobox.com>
2006-12-27pvrusb2: Use separate enumeration for get/store of minor numberMike Isely
From: Mike Isely <isely@pobox.com> Use separate enum for get/store of minor number; we want pvr2_config to go away eventually and since it really means something different, don't use it here Signed-off-by: Mike Isely <isely@pobox.com>
2006-12-27pvrusb2: Use enumeration for minor number get / store codeMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2006-12-27pvrusb2: Implement multiple minor device number handlingMike Isely
From: Pantelis Koukousoulas <pakt223@freemail.gr> This is the first patch in preparation of the V4L2/IVTV radio interface. It does away with the assumption of only one minor per device. It also adds a file to show the radio minor as well. This can be useful for a program like pvr-radio.c (when it grows up), since this way it can search for the minor of the /dev/radioX device it opened and use the video minor of the same driver instance to get to the actual stream. The implementation looks kinda ugly. Feel free to improve (that is the reason behind separate patches anyway). --Pantelis Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr> Signed-off-by: Mike Isely <isely@pobox.com>
2006-09-02Remove some dead data elements from pvrusb2 driverMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2006-07-22Correctly handle sysfs error leg file removal in pvrusb2Mike Isely
From: Mike Isely <isely@pobox.com> Take note of which sysfs files / groups that the pvrusb2 successfully creates and only delete those specific items when tearing things down. (Previously we just blindly tore everything down every time.) Signed-off-by: Mike Isely <isely@pobox.com>
2006-07-19Removed the remaining config.h stuffMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Since kernel include autoconf.h via command line, those config.h inclusion can be removed. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-18pvrusb2: check the return value of class_device_create_fileMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> class_device_create_file is marked as __must_check, so its return value must be checked. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-07-18pvrusb2: check the return value of class_device_registerMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> If an error occurs during class_device_register, print an error message, kfree(class_dev) and return. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-06-30Clean out a zillion sparse warnings in pvrusb2Mauro Carvalho Chehab
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25Handle boolean controls in pvrusb2Mike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2006-06-25Increase the maximum number of controls that pvrusb2-sysfs.c can handle.Mike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2006-06-25Don't print empty enum values in pvrusb2-sysfs.cMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2006-05-07bug-fix: pvrusb2 must #include <linux/config.h> for compile-time optionsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Added necessary header file in order for kconfig build options to be considered at compile time. Without this patch all options will always be disabled, regardless of whether they are selected or not. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Mike Isely <isely@pobox.com>
2006-04-19Rework pvrusb2 internal controls implementationMike Isely
From: Mike Isely <isely@pobox.com> Rework controls internal architecture. Rework video standard handling. This is a major change. Signed-off-by: Mike Isely <isely@pobox.com>
2006-03-30Make parts of pvrusb2 compile-time options (sysfs and debugifc)Mike Isely
From: Mike Isely <isely@pobox.com> Arrange things in pvrusb2 so that the sysfs-using component doesn't have to be compiled in. Control this with new CONFIG_VIDEO_PVRUSB2_SYSFS variable. This will allow the driver to still be used even if sysfs has not been compiled into the kernel. Also arrange things similarly in pvrusb2 for the debug interface, which is something that normally should not need to be built but is valuable for bug chasing. This is controlled now with CONFIG_VIDEO_PVRUSB2_DEBUGIFC. Signed-off-by: Mike Isely <isely@pobox.com>
2006-03-28Fix pvrusb2 kernel oopsMike Isely
From: Mike Isely <isely@pobox.com> This problem was introduced by the previous change. It appears that if you try to create to sysfs entries of the same name in one directory, then sysfs gets very angry and causes a kernel oops when you later try to tear down those nodes. By not allocating enough space to hold the name, we were inadvertently causing a sysfs control file name collision... Signed-off-by: Mike Isely <isely@pobox.com>
2006-03-28Major pvrusb2 rework to remove translationsMike Isely
From: Mike Isely <isely@pobox.com> Rework entire internal controls interface to eliminate the need for visibly defined control IDs which must otherwise be translated by the V4L2 public interface. As part of this work, internal structures which mimiced various V4L2 structures (video standards, audio modes) have been reworked to actually use the native structures. This triggered a _significant_ rework for how video standards are dealt with (and what is in place now should be much more flexible and forgiving for various handling less-common video standards). Signed-off-by: Mike Isely <isely@pobox.com>
2006-03-26Get rid of static PVR2_CID_COUNT in pvrusb2Mike Isely
From: Mike Isely <isely@pobox.com> Eliminate the need to track the number pvrusb2 CIDs at compile time from within the pvrusb2 driver. This is part of a control structure cleanup. Signed-off-by: Mike Isely <isely@pobox.com>
2006-03-25Fix screwed up indentation in pvrusb2-sysfs.cMike Isely
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
2006-02-26moved pvrusb2 driver into the kernel treeMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>