summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/pmic-cpcap.c
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2020-12-31 08:10:32 +0300
committerArd Biesheuvel <ardb@kernel.org>2020-12-31 12:28:53 +0300
commit355845b738e76445c8522802552146d96cb4afa7 (patch)
tree1302d389198bb98710ddef8c02b3baf9e8993a95 /arch/arm/mach-omap2/pmic-cpcap.c
parent5c8fe583cce542aa0b84adc939ce85293de36e5e (diff)
downloadlinux-355845b738e76445c8522802552146d96cb4afa7.tar.xz
efi/apple-properties: Reinstate support for boolean properties
Since commit 4466bf82821b ("efi/apple-properties: use PROPERTY_ENTRY_U8_ARRAY_LEN"), my MacBook Pro issues a -ENODATA error when trying to assign EFI properties to the discrete GPU: pci 0000:01:00.0: assigning 56 device properties pci 0000:01:00.0: error -61 assigning properties That's because some of the properties have no value. They're booleans whose presence can be checked by drivers, e.g. "use-backlight-blanking". Commit 6e98503dba64 ("efi/apple-properties: Remove redundant attribute initialization from unmarshal_key_value_pairs()") employed a trick to store such booleans as u8 arrays (which is the data type used for all other EFI properties on Macs): It cleared the property_entry's "is_array" flag, thereby denoting that the value is stored inline in the property_entry. Commit 4466bf82821b erroneously removed that trick. It was probably a little fragile to begin with. Reinstate support for boolean properties by explicitly invoking the PROPERTY_ENTRY_BOOL() initializer for properties with zero-length value. Fixes: 4466bf82821b ("efi/apple-properties: use PROPERTY_ENTRY_U8_ARRAY_LEN") Cc: <stable@vger.kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Link: https://lore.kernel.org/r/be958bda75331a011d53c696d1deec8dccd06fd2.1609388549.git.lukas@wunner.de Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/arm/mach-omap2/pmic-cpcap.c')
0 files changed, 0 insertions, 0 deletions