summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* regulator: Fix comments in include/linux/regulator/machine.hAxel Lin2012-03-291-5/+3Star
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Only update [LDOx|DCx]_HIB_MODE bits in ↵Axel Lin2012-03-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | wm8350_[ldo|dcdc]_set_suspend_disable What we want is to disable output by setting [LDOx|DCx]_HIB_MODE bits. Current code also clears other bits in LDOx/DCDCx Low Power register. R202 (CAh) LDO1 Low Power BIT[13:12] LDO1 Hibernate behaviour: 00 = Select voltage image settings 01 = disable output 10 = reserved 11 = reserved R182 (B6h) DCDC1 Low Power BIT[14:12] DC-DC1 Hibernate behaviour: 000 = Use current settings (no change) 001 = Select voltage image settings 010 = Force standby mode 011 = Force standby mode and voltage image settings. 100 = Force LDO mode 101 = Force LDO mode and voltage image settings. 110 = Reserved. 111 = Disable output Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Fix setting low power mode for wm831x aldoAxel Lin2012-03-291-5/+2Star
| | | | | | | | | | | | Set BIT[8] of LDO7 ON Control mode for low power mode. R16507 (407Bh) LDO7 ON Control BIT[8] LDO7_ON_MODE: LDO7 ON Operating Mode 0 = Normal mode 1 = Low Power mode Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Return microamps in wm8350_isink_get_currentAxel Lin2012-03-281-1/+1
| | | | | | | | The values in isink_cur array are microamps. The regulator core expects get_current_limit callback to return microamps. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8350: Fix the logic to choose best current limit settingAxel Lin2012-03-281-1/+1
| | | | | | | | | | Current implementation in get_isink_val actually choose the biggest current limit setting falls within the specified range. What we want is to choose the smallest current limit setting falls within the specified range. Fix it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x-isink: Fix the logic to choose best current limit settingAxel Lin2012-03-281-1/+1
| | | | | | | | | | | Current code in wm831x_isink_set_current actually set the current limit setting smaller than specified range. Fix the logic in wm831x_isink_set_current to choose the smallest current limit setting falls within the specified range. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x-dcdc: Fix the logic to choose best current limit settingAxel Lin2012-03-281-1/+2
| | | | | | | | | | | Current code in wm831x_buckv_set_current_limit actually set the current limit setting greater than specified range. Fix the logic in wm831x_buckv_set_current_limit to choose the smallest current limit setting falls within the specified range. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: anatop: patching to device-tree property "reg".Ying-Chun Liu (PaulLiu)2012-03-282-2/+32
| | | | | | | | | | | Change "reg" to "anatop-reg-offset" due to there is a warning of handling no size field in reg. This patch also adds the missing device-tree binding documentation. Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Do proper shift to set correct bit for DC[2|5]_HIB_MODE settingAxel Lin2012-03-261-6/+6
| | | | | | | | | DC[2|5]_HIB_MODE is BIT 12 of DCDC[2|5] Control register. WM8350_DC2_HIB_MODE_ACTIVE/WM8350_DC2_HIB_MODE_DISABLE are defined as 1/0. Thus we need to left shift WM8350_DC2_HIB_MODE_SHIFT bits. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Fix restoring pmic.dcdcx_hib_mode settings in ↵Axel Lin2012-03-261-4/+4
| | | | | | | | | | | wm8350_dcdc_set_suspend_enable What we want is to restore wm8350->pmic.dcdcx_hib_mode settings to WM8350_DCDCx_LOW_POWER registers. Current code also clears all other bits of WM8350_DCDCx_LOW_POWER registers which is wrong. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Fix unbalanced lock/unlock in mc13892_regulator_probe error pathAxel Lin2012-03-261-5/+5
| | | | | | | | We do not hold a lock while registering regulator, thus should not call unlock if regulator_register fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Fix set and get current limit for wm831x_buckvAxel Lin2012-03-261-2/+4
| | | | | | | | WM831X_DC1_HC_THR_MASK is 0x0070. We need to do proper shift for setting and getting current limit. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps6586x: Fix list minimal voltage setting for LDO0Axel Lin2012-03-261-0/+5
| | | | | | | | | | | | | | According to the datasheet, LDO0 has minimal voltage 1.2V rather than 1.25V. Table 3-39. VLDO0[2:0] Settings VLDOx[2:0] VOUT (V) VLDOx[2:0] VOUT (V) 000 1.20 100 2.70 001 1.50 101 2.85 010 1.80 110 3.10 011 2.50 111 3.30 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'topic/twl' into regulator-nextMark Brown2012-03-194-84/+366
|\ | | | | | | | | | | | | TWL specific changes, cross-merged with OMAP due to arch/arm wanting to use the new ability to override the voltage set and get operations to support the in-CPU voltage management. The other changes are minor fixes, the addition of a few new regulators and device tree support.
| * mfd: twl-core: regulator configuration for twl6030 V1V8, V2V1 SMPSPeter Ujfalusi2012-03-112-0/+12
| | | | | | | | | | | | | | | | | | To be able to attach consumers to these supplies from board files we need to have regulator_init_data for them. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: twl-regulator: Add fixed LDO for V1V8, V2V1 supplyPeter Ujfalusi2012-03-112-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | V1V8 supply most common use is to provide VIO for the system. V2V1 supply is used on SDP4430/PandaBoards to provide 2.1V to twl6040, and also as an input to VCXIO_IN, VDAC_IN of twl6030. Also update the bindings documentation with the new compatible property for these additional LDOs. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: twl: adapt twl-regulator driver to dtRajendra Nayak2012-03-112-87/+238
| | | | | | | | | | | | | | | | | | | | | | Modify the twl regulator driver to extract the regulator_init_data from device tree when passed, instead of getting it through platform_data structures (on non-DT builds) Also add documentation for TWL regulator specific bindings. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: twl6030: add support for vdd1, vdd2 and vdd3 regulatorsTero Kristo2012-03-113-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | vdd1 and vdd2 are now common regulators for twl4030 and twl6030. Also added vdd3 as a new regulator for twl6030. twl6030 vdd1...vdd3 smps regulator voltages can only be controlled through the smartreflex voltage channel, thus the support for the voltage_get and set is minimal and requires external controller. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: twl4030: add support for external voltage get/setTero Kristo2012-03-113-6/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for SMPS regulators, which use the OMAP voltage processor for voltage get/set functions instead of the normal I2C channel. For this purpose, regulator_init_data->driver_data contents are expanded, it is now a struct which contains function pointers for the set/get voltage operations, a data pointer for these, and the previously used features bitmask. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> [for the MFD part] Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: twl6030: Fix voltage selection logicLaxman Dewangan2012-03-111-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | The voltage selection logic for the twl6030 smps fails if min:max is such that min < 1300mV and max > 1300mV although this is in valid range for a regulator e.g. [x, 1350] where x < 1300. Fixing the voltage selection logic such that first it will check for min_uV for a range and then calculated value will be checked against max_uV. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'regulator/topic/supply' into regulator-nextMark Brown2012-03-184-25/+12Star
|\ \
| * | regulator: Remove obsolete consumer_dev related commentAxel Lin2012-02-181-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | consumer_dev is remove by commit 737f36 "regulator: Remove support for supplies specified by struct device". Thus remove the obsolete comment. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ARM: U300: Don't specify regulator consumers by struct deviceAxel Lin2012-02-171-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dev field is remove from struct regulator_consumer_supply since commit 737f36 "regulator: Remove support for supplies specified by struct device". This fixes below build error: CC arch/arm/mach-u300/i2c.o arch/arm/mach-u300/i2c.c:63: error: unknown field 'dev' specified in initializer arch/arm/mach-u300/i2c.c:95: error: unknown field 'dev' specified in initializer make[1]: *** [arch/arm/mach-u300/i2c.o] Error 1 make: *** [arch/arm/mach-u300] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | mfd: twl-core: Don't specify regulator consumers by struct deviceMark Brown2012-02-031-4/+4
| | | | | | | | | | | | | | | | | | | | | This has been deprecated for considerable time now and support has been removed from the regulator API. dev_name should be used instead. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: Remove support for supplies specified by struct deviceMark Brown2012-02-022-17/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | This has been deprecated for a very long time now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Liam Girdwood <lrg@ti.com>
| * | Merge branch 'regulator-drivers' into regulator-supplyMark Brown2012-02-0214-122/+2492
| |\ \
* | \ \ Merge remote-tracking branches 'regulator/topic/devm' and ↵Mark Brown2012-03-183-0/+135
|\ \ \ \ | | | | | | | | | | | | | | | 'regulator/topic/stub' into regulator-next
| * | | | regulator: add devm_regulator_* to the list of managed interfacesAxel Lin2012-01-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add devm_regulator_put() and devm_regulator_bulk_get() to the list of managed interfaces. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | regulator: Add devm_regulator_put in consumer.hAxel Lin2012-01-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d5ad34f7cb "regulator: Implement devm_regulator_free()" actually implements devm_regulator_put. Thus rename devm_regulator_free to devm_regulator_put. Also add empty devm_regulator_put for !CONFIG_REGULATOR Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | regulator: Add empty devm_regulator_bulk_get for !CONFIG_REGULATORAxel Lin2012-01-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes below build error if CONFIG_REGULATOR is disabled. CC sound/soc/codecs/wm5100.o sound/soc/codecs/wm5100.c: In function ‘wm5100_i2c_probe’: sound/soc/codecs/wm5100.c:2462: error: implicit declaration of function ‘devm_regulator_bulk_get’ make[3]: *** [sound/soc/codecs/wm5100.o] Error 1 make[2]: *** [sound/soc/codecs] Error 2 make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | regulator: Provide devm_regulator_bulk_get()Mark Brown2012-01-222-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow drivers to benefit from both the bulk APIs and managed resources simultaneously. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | regulator: Implement devm_regulator_free()Mark Brown2012-01-222-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow consumers to free regulators allocated using devm_regulator_get() if they need to. This will not normally be required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | regulator: Add devm_regulator_get()Stephen Boyd2012-01-203-0/+46
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a resource managed regulator_get() to simplify regulator usage in drivers. This allows driver authors to "get and forget" about their regulators by automatically calling regulator_put() when the driver is detached. [Fixed up a couple of coding style issues -- broonie] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | | Merge remote-tracking branch 'regulator/topic/stub' into regulator-nextMark Brown2012-03-181400-54440/+12587Star
|\ \ \ \
| * | | | ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x deviceSascha Hauer2012-03-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | ARM i.MX pcm037: register a dummy regulator for the smsc911x deviceSascha Hauer2012-03-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | regulator: provide a helper for registering a fixed regulatorSascha Hauer2012-03-033-1/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices require a regulator to work, but boards may not have a software controllable regulator for this device. Provide a helper function to make it simpler for these boards to register a fixed regulator as a dummy regulator. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | | Linux 3.3-rc5Linus Torvalds2012-02-251-1/+1
| | | | |
| * | | | Merge tag 'hwmon-for-linus' of ↵Linus Torvalds2012-02-254-17/+17
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Couple of minor driver fixes. * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (max34440) Fix resetting temperature history hwmon: (f75375s) Fix register write order when setting fans to full speed hwmon: (ads1015) Fix file leak in probe function hwmon: (max6639) Fix PPR register initialization to set both channels hwmon: (max6639) Fix FAN_FROM_REG calculation
| | * | | | hwmon: (max34440) Fix resetting temperature historyGuenter Roeck2012-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temperature history is reset by writing 0x8000 into the peak temperature register, not 0xffff. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
| | * | | | hwmon: (f75375s) Fix register write order when setting fans to full speedNikolaus Schulz2012-02-231-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By hwmon sysfs interface convention, setting pwm_enable to zero sets a fan to full speed. In the f75375s driver, this need be done by enabling manual fan control, plus duty mode for the F875387 chip, and then setting the maximum duty cycle. Fix a bug where the two necessary register writes were swapped, effectively discarding the setting to full-speed. Signed-off-by: Nikolaus Schulz <mail@microschulz.de> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
| | * | | | hwmon: (ads1015) Fix file leak in probe functionGuenter Roeck2012-02-231-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An error while creating sysfs attribute files in the driver's probe function results in an error abort, but already created files are not removed. This patch fixes the problem. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: stable@vger.kernel.org # 3.0+ Cc: Dirk Eibach <eibach@gdsys.de> Acked-by: Jean Delvare <khali@linux-fr.org>
| | * | | | hwmon: (max6639) Fix PPR register initialization to set both channelsChris D Schimp2012-02-211-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize PPR register for both channels, and set correct PPR register bits. Also remove unnecessary variable initializations. Signed-off-by: Chris D Schimp <silverchris@gmail.com> [guenter.roeck@ericsson.com: Merged two patches into one] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: stable@vger.kernel.org # 3.0+ Acked-by: Roland Stigge <stigge@antcom.de>
| | * | | | hwmon: (max6639) Fix FAN_FROM_REG calculationChris D Schimp2012-02-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPM calculation from tachometer value does not depend on PPR. Also, do not report negative RPM values. Signed-off-by: Chris D Schimp <silverchris@gmail.com> [guenter.roeck@ericsson.com: do not report negative RPM values] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: stable@vger.kernel.org # 3.0+ Acked-by: Roland Stigge <stigge@antcom.de>
| * | | | | Merge branch 'rc-fixes' of ↵Linus Torvalds2012-02-253-21/+10Star
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild three kbuild fixes for 3.3: - make deb-pkg symlink race fix. - make coccicheck fix. - Dropping the check for modutils. This is not a regression, but allows the module-init-tools replacement kmod work with the 3.3 kernel. * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: coccicheck: change handling of C={1,2} when M= is set builddeb: Don't create files in /tmp with predictable names kbuild: do not check for ancient modutils tools
| | * | | | | coccicheck: change handling of C={1,2} when M= is setGreg Dietsche2012-02-241-9/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reverts a portion of d0bc1fb4 so that coccicheck will work properly when C=1 or C=2. Reported-and-tested-by: Brice Goglin <Brice.Goglin@inria.fr> Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
| | * | | | | builddeb: Don't create files in /tmp with predictable namesBen Hutchings2012-02-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current use of /tmp for file lists is insecure. Put them under $objtree/debian instead. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable@vger.kernel.org # 2.6.39+ Acked-by: maximilian attems <max@stro.at> Signed-off-by: Michal Marek <mmarek@suse.cz>
| | * | | | | kbuild: do not check for ancient modutils toolsLucas De Marchi2012-01-231-6/+0Star
| | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scripts/depmod.sh checks for the output of '-V' expecting that it has module-init-tools in it. It's a hack to prevent users from using modutils instead of module-init-tools, that only works with 2.4.x kernels. This however prints an annoying warning for kmod tool, that is currently replacing module-init-tools. Rather than putting another check for kmod's version, just remove it since users of 2.4.x kernel are unlikely to upgrade to 3.x, and if they do, let depmod fail in that case because they should know what they are doing. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Acked-by: WANG Cong <amwang@redhat.com> Acked-By: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * | | | | autofs: work around unhappy compat problem on x86-64Ian Kent2012-02-254-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the autofs protocol version 5 packet type was added in commit 5c0a32fc2cd0 ("autofs4: add new packet type for v5 communications"), it obvously tried quite hard to be word-size agnostic, and uses explicitly sized fields that are all correctly aligned. However, with the final "char name[NAME_MAX+1]" array at the end, the actual size of the structure ends up being not very well defined: because the struct isn't marked 'packed', doing a "sizeof()" on it will align the size of the struct up to the biggest alignment of the members it has. And despite all the members being the same, the alignment of them is different: a "__u64" has 4-byte alignment on x86-32, but native 8-byte alignment on x86-64. And while 'NAME_MAX+1' ends up being a nice round number (256), the name[] array starts out a 4-byte aligned. End result: the "packed" size of the structure is 300 bytes: 4-byte, but not 8-byte aligned. As a result, despite all the fields being in the same place on all architectures, sizeof() will round up that size to 304 bytes on architectures that have 8-byte alignment for u64. Note that this is *not* a problem for 32-bit compat mode on POWER, since there __u64 is 8-byte aligned even in 32-bit mode. But on x86, 32-bit and 64-bit alignment is different for 64-bit entities, and as a result the structure that has exactly the same layout has different sizes. So on x86-64, but no other architecture, we will just subtract 4 from the size of the structure when running in a compat task. That way we will write the properly sized packet that user mode expects. Not pretty. Sadly, this very subtle, and unnecessary, size difference has been encoded in user space that wants to read packets of *exactly* the right size, and will refuse to touch anything else. Reported-and-tested-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | | | Merge tag 'rdma-for-linus' of ↵Linus Torvalds2012-02-252-7/+7
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband One InfiniBand/RDMA regression fix for 3.3: - mlx4 SR-IOV changes added static exported functions, which doesn't build on powerpc at least. Fix from Doug Ledford for this. * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: mlx4_core: Exported functions can't be static