summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * mtd: mxc_nand: put callback for data correction into devtype structUwe Kleine-König2012-05-141-4/+6
| | | | | | | | | | | | | | | | This gets rid of one more nfc_is_vX(). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: split chip_select function and put it into devtype structUwe Kleine-König2012-05-141-5/+28
| | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: put ecc layout into devtype structsUwe Kleine-König2012-05-141-11/+14
| | | | | | | | | | | | | | | | | | This commit makes problems on v1 and v2 regarding 4KiBpages more obvious. As I don't have a 4KiB flash handy I just keep the status quo. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: split some functions to get rid of more nfc_is_vX()Uwe Kleine-König2012-05-141-29/+80
| | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: move function pointers to a per-SOC structUwe Kleine-König2012-05-141-66/+104
| | | | | | | | | | | | | | | | This prepares switching to platform ids and of-tree probing. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: use a flag to detect if the mx21 quirk is necessaryUwe Kleine-König2012-05-141-49/+49
| | | | | | | | | | | | | | | | This gets rid of several instances of cpu_is_mx21() in the driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mxc_nand: set owner field to prevent module unloading when in useUwe Kleine-König2012-05-141-0/+1
| | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: block2mtd: page_read() never returns NULLRyosuke Saito2012-05-141-6/+0Star
| | | | | | | | | | | | | | | | page_read() never returns NULL, so we can remove the NULL check here. Signed-off-by: Ryosuke Saito <raitosyo@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: bcm63xxpart: handle Broadcom partition orderJonas Gorski2012-05-141-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | The original Broadcom partition order has the root fs in front of the kernel, which resulted in miscalculated partition sizes. Detect when such an image is on the flash and also reorder the partitions accordingly. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: nand: omap: fix race condition in omap_wait()Ivan Djelic2012-05-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a context switch occurs in function omap_wait() just before the while loop is entered, then upon return from context switch the timeout may already have elapsed: in that case, status is never read from NAND device, and omap_wait() returns an error. This failure has been experimentally observed during stress tests. This patch ensures a NAND status read is always performed before returning, as in the generic nand_wait() function. Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: fsmc_nand: Add clk_{un}prepare() supportViresh Kumar2012-05-141-7/+7
| | | | | | | | | | | | | | | | | | | | | | clk_{un}prepare is mandatory for platforms using common clock framework. Since this driver is used by SPEAr platform, which supports common clock framework, add clk_{un}prepare() support for it. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: spear_smi: Add clk_{un}prepare() supportViresh Kumar2012-05-141-7/+7
| | | | | | | | | | | | | | | | | | | | | | clk_{un}prepare is mandatory for platforms using common clock framework. Since this driver is used by SPEAr platform, which supports common clock framework, add clk_{un}prepare() support for it. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: fix scb2_flash build when PCI is not enabledRandy Dunlap2012-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | scb2_flash.c is a PCI driver, but its build fails when CONFIG_PCI is not enabled, so make it depend on PCI. drivers/mtd/maps/scb2_flash.c:237:1: warning: data definition has no type or storage class drivers/mtd/maps/scb2_flash.c:237:1: warning: type defaults to 'int' in declaration of 'module_pci_driver' drivers/mtd/maps/scb2_flash.c:237:1: warning: parameter names (without types) in function declaration Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: omap2: fix resource leak in prefetch-busy pathGrazvydas Ignotas2012-05-141-1/+3
| | | | | | | | | | | | | | | | | | If prefetch engine is busy, current code "forgets" to call dma_unmap_single(), which results in a deadlock later, so add it. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * JFFS2: Add parameter to reserve disk space for rootDaniel Drake2012-05-143-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new rp_size= parameter which creates a "reserved pool" of disk space which can only be used by root. Other users are not permitted to write to disk when the available space is less than the pool size. Based on original code by Artem Bityutskiy in https://dev.laptop.org/ticket/5317 [dwmw2: use capable(CAP_SYS_RESOURCE) not uid/gid check, fix debug prints] Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: print out the page size and oob size after parsing out the nandHuang Shijie2012-05-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some not-supported nand chips may pass the current parsing code, and get the wrong page size and oob size. Sometimes, it's hard to notice that you get the wrong values, because there is no warning or error. So it's useful to print out the page size and oob size in the end of the parsing function. We can check these values with the datasheet of the nand chip as soon as possible. Artem: amend the print a bit Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: IFC NAND: Add support of ONFI NAND flashPrabhakar Kushwaha2012-05-141-6/+16
| | | | | | | | | | | | | | | | | | | | - Fix NAND_CMD_READID command for ONFI detect. - Add NAND_CMD_PARAM command to read the ONFI parameter page. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: lpddr: replace open-coded ARRAY_SIZE with macroJim Cromie2012-05-141-1/+1
| | | | | | | | | | | | Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: use module_pci_driverAxel Lin2012-05-146-75/+6Star
| | | | | | | | | | | | | | | | | | This patch converts the drivers in drivers/mtd/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: gpmi: do not include the mxs.hHuang Shijie2012-05-141-4/+5
| | | | | | | | | | | | | | | | | | The mxs.h does not exit in the mx6q. So rewrite the __mxs_clrl()/__mxs_setl() and remove the mxs.h. Signed-off-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: mark const init data with __initconst instead of __initdataUwe Kleine-König2012-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as there is no other non-const variable marked __initdata in the same compilation unit it doesn't hurt. If there were one however compilation would fail with error: $variablename causes a section type conflict because a section containing const variables is marked read only and so cannot contain non-const variables. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * sh: Use the plat_nand default partition parserH Hartley Sweeten2012-05-141-1/+0Star
| | | | | | | | | | | | | | | | Use the default partition parser, cmdlinepart, provided by the plat_nand driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mips: Use the plat_nand default partition parserH Hartley Sweeten2012-05-144-15/+0Star
| | | | | | | | | | | | | | | | Use the default partition parser, cmdlinepart, provided by the plat_nand driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * blackfin: Use the plat_nand default partition parserH Hartley Sweeten2012-05-141-3/+0Star
| | | | | | | | | | | | | | | | | | Use the default partition parser, cmdlinepart, provided by the plat_nand driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * arm: Use the plat_nand default partition parserH Hartley Sweeten2012-05-1411-33/+0Star
| | | | | | | | | | | | | | | | | | | | | | Use the default partition parser, cmdlinepart, provided by the plat_nand driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Alexander Clouter <alex@digriz.org.uk> Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| * mtd: plat_nand: Add default partition parser to driverH Hartley Sweeten2012-05-141-2/+6
| | | | | | | | | | | | | | | | | | Use cmdlinepart as the default partition parser and allow the arch setup code to still use their own partition parsers. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86Linus Torvalds2012-06-0211-629/+1416
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull x86 platform driver updates from Matthew Garrett: "Some significant improvements for the Sony driver on newer machines, but other than that mostly just minor fixes and a patch to remove the broken rfkill code from the Dell driver." * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: (35 commits) apple-gmux: Fix up the suspend/resume patch dell-laptop: Remove rfkill code toshiba_acpi: Fix mis-merge dell-laptop: Add touchpad led support for Dell V3450 acer-wmi: add 3 laptops to video backlight vendor mode quirk table sony-laptop: add touchpad enable/disable function sony-laptop: add missing Fn key combos for 0x100 handlers sony-laptop: add support for more WWAN modems sony-laptop: new keyboard backlight handle sony-laptop: add high speed battery charging function sony-laptop: support automatic resume on lid open sony-laptop: adjust error handling in finding SNC handles sony-laptop: add thermal profiles support sony-laptop: support battery care functions sony-laptop: additional debug statements sony-laptop: improve SNC initialization and acpi notify callback code sony-laptop: use kstrtoul to parse sysfs values sony-laptop: generalise ACPI calls into SNC functions sony-laptop: fix return path when no ACPI buffer is allocated sony-laptop: use soft rfkill status stored in hw ...
| * | apple-gmux: Fix up the suspend/resume patchMatthew Garrett2012-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I incorporated the wrong version of the suspend/resume patch for gmux, and so lost David Woodhouse's fix to leave the backlight level unchanged over suspend/resume. This fixes it up to v2. Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | dell-laptop: Remove rfkill codeMatthew Garrett2012-06-011-289/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | The interface just doesn't work on some machines, and Dell haven't been able to tell us either which machines those are or what we should be doing instead. This would be fine, except it results in userspace ending up confused and general sadness. So let's just rip it out for now. Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | toshiba_acpi: Fix mis-mergeMatthew Garrett2012-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | I managed to screw up the various backlight changes and ended up memsetting the props structure after it had already been populated. This should fix it. Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | dell-laptop: Add touchpad led support for Dell V3450AceLan Kao2012-05-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Add Dell Vostro 3450 quirk to support touchpad LED. CC: Mariusz Fik <fisiu@opensuse.org> Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | acer-wmi: add 3 laptops to video backlight vendor mode quirk tableLee, Chun-Yi2012-05-311-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acer Extensa 5235, TravelMate 5760 and Aspire 5750 laptop have broken _BCM implemenation, the AML code wrote value to EC register but firmware didn't change brighenss. Fortunately, the brightness control works on those machines with vendor mode. So, add this machine to video backlight vendor mode quirk table. Reference: bko#36322 https://bugzilla.kernel.org/show_bug.cgi?id=36322 Reference: bko#42833 https://bugzilla.kernel.org/show_bug.cgi?id=42833 Reference: bko#42993 https://bugzilla.kernel.org/show_bug.cgi?id=42993 Cc: Christopher M. Penalver <christopher.penalver@gmx.com> Cc: Bence Lukacs <lukacs.bence1@gmail.com> Cc: Joern Heissler <kernelbugs2012@joern.heissler.de> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: add touchpad enable/disable functionMarco Chiappero2012-05-311-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This setting is stored in the EC and available across reboots. [malattia@linux.it: group function specific variables in a struct, use kstrtoul] Signed-off-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: add missing Fn key combos for 0x100 handlersMarco Chiappero2012-05-311-0/+4
| | | | | | | | | | | | | | | | | | Signed-off-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: add support for more WWAN modemsMarco Chiappero2012-05-311-19/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also make the initialization function return a value for consistency with all the other setup functions. Signed-off-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: new keyboard backlight handleMarco Chiappero2012-05-311-62/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for handle 0x0143 (Vaio SA/SB/SC, CA/CB) and rework the code to be hable to support different handles for the keyboard backlight function. [malattia@linux.it: group function specific variables in a struct] Signed-off-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: add high speed battery charging functionMarco Chiappero2012-05-311-0/+86
| | | | | | | | | | | | | | | | | | Signed-off-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: support automatic resume on lid openMarco Chiappero2012-05-311-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few models offer the chance to set whether to resume from S3 and/or S4 when opening the lid. [malattia@linux.it: create three sysfs files for S3/4/5 rather than using a single one accepting a bitmask. Support S5 since the DSDT exports it. Use a struct to hold all the related values, caching of the current status value rather than re-reading all the time in the sysfs show function.] Signed-off-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: adjust error handling in finding SNC handlesMattia Dongili2012-05-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | All handles must be greater than 0, also return more meaningful error codes on invalid conditions. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: add thermal profiles supportMarco Chiappero2012-05-311-0/+183
| | | | | | | | | | | | | | | | | | | | | | | | [malattia@linux.it: support string based profiles names] Signed-off-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: support battery care functionsMarco Chiappero2012-05-311-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows limiting the maximum battery charge level to a selectable value (100%, 80% and 50%). [malattia@linux.it: group function specific variables in a struct, use kstrtoul. Allow 0 to 100 values into sysfs files rounding to the actual limit.] Signed-off-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: additional debug statementsMattia Dongili2012-05-311-1/+6
| | | | | | | | | | | | | | | Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: improve SNC initialization and acpi notify callback codeMarco Chiappero2012-05-311-86/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loop through the list of SNC handles and run the proper initialization function for each of the known handles. Also return void in function where we are not checking the return value anyway. For notifications we also know which handle is linked to the event and the code becomes simpler to read with a switch rather than using convoluted ifs. [malattia@linux.it: Code reworked to merge the initialization code improvements and the notify callback changes. Modified the code paths to allow easier error exit paths. Also fixed some missing break statements and spelling mistakes.] Signed-off-by: Marco Chiappero <marco@absence.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: use kstrtoul to parse sysfs valuesMattia Dongili2012-05-311-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | This avoids surprises like echoing "enable" into a sysfs file and finding that the feature was actually disabled. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: generalise ACPI calls into SNC functionsMattia Dongili2012-05-311-142/+133Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All calls into the SNC device methods have zero or one arguments and return an integer or a buffer (some functions go as far as returning an integer _or_ a buffer depending on the input parameter...). This allows simplifying a couple of code paths and prepares the field for other users of functions returning buffers. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: fix return path when no ACPI buffer is allocatedMattia Dongili2012-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The goto target location would still try to free a buffer that was never allocated. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | sony-laptop: use soft rfkill status stored in hwMarco Chiappero2012-05-311-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SNC device on recent Vaio laptops also stores the soft status and leaves it available after reboot. Use it and always set the last soft and hard status on module load. [malattia@linux.it: patch taken from a largely modified sony-laptop.c, smaller modifications to the original code to simplify it] Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | hp-wmi: check for allocation failuresDan Carpenter2012-05-311-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | rfkill_alloc() returns NULL on failure. Check for it, to make the static checkers happy. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | toshiba_acpi: Add support for transflective LCDAkio Idehara2012-05-311-4/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Toshiba laptops have the transflective LCD and toshset can control its backlight state. I brought this feature to the mainline. To support transflective LCD, it's implemented by adding an extra level to the backlight and having 0 change to transflective mode. It was tested on a Toshiba Portege R500. Signed-off-by: Akio Idehara <zbe64533@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
| * | toshiba_acpi: Only register backlight device when interface is read/writeSeth Forshee2012-05-311-24/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the backlight device is registered unconditionally, but many (probably most) Toshibas either don't support HCI_LCD_BRIGHTNESS or only support reading from it. This patch adds a test of HCI_LCD_BRIGHTNESS during initialization and only registers the backlight device if this interface supports both reads and writes. Cc: Akio Idehara <zbe64533@gmail.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>