summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2018-06-16 10:33:03 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2018-06-16 10:33:03 +0200
commit07c01385fb82b6c7e83c76ec63c4f43b784e6548 (patch)
tree8d6c00bc5f8e38a3aa400260da3e2cff0bc49df3 /drivers/gpio/gpiolib.c
parenta2e2217bd824475c7469047898d60ba78f3891d8 (diff)
parent0bd2bedb3501db249b347e5acbfd3415bd7667a5 (diff)
Merge 4.4.138 into android-4.4
Changes in 4.4.138 x86/fpu: Fix early FPU command-line parsing x86: Remove unused function cpu_has_ht_siblings() x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros x86/fpu: Disable MPX when eagerfpu is off x86/fpu: Disable AVX when eagerfpu is off x86/fpu: Default eagerfpu=on on all CPUs x86/fpu: Fix 'no387' regression x86/fpu: Revert ("x86/fpu: Disable AVX when eagerfpu is off") x86/fpu: Fix eager-FPU handling on legacy FPU machines x86/fpu: Hard-disable lazy FPU mode x86/fpu: Fix FNSAVE usage in eagerfpu mode x86/fpu: Fix math emulation in eager fpu mode af_key: Always verify length of provided sadb_key x86/crypto, x86/fpu: Remove X86_FEATURE_EAGER_FPU #ifdef from the crc32c code gpio: No NULL owner Clarify (and fix) MAX_LFS_FILESIZE macros KVM: x86: introduce linear_{read,write}_system KVM: x86: pass kvm_vcpu to kvm_read_guest_virt and kvm_write_guest_virt_system serial: samsung: fix maxburst parameter for DMA transactions vmw_balloon: fixing double free when batching mode is off kvm: x86: use correct privilege level for sgdt/sidt/fxsave/fxrstor access Input: goodix - add new ACPI id for GPD Win 2 touch screen Input: elan_i2c - add ELAN0612 (Lenovo v330 14IKB) ACPI ID crypto: vmx - Remove overly verbose printk from AES init routines Linux 4.4.138 Change-Id: I443664406b736e16c77c99d83e9bdf02f4511ee4 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 759a39906a52..fe89fd56eabf 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2117,6 +2117,8 @@ struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
struct gpio_desc *desc = NULL;
int status;
enum gpio_lookup_flags lookupflags = 0;
+ /* Maybe we have a device name, maybe not */
+ const char *devname = dev ? dev_name(dev) : "?";
dev_dbg(dev, "GPIO lookup for consumer %s\n", con_id);
@@ -2145,8 +2147,11 @@ struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
return desc;
}
- /* If a connection label was passed use that, else use the device name as label */
- status = gpiod_request(desc, con_id ? con_id : dev_name(dev));
+ /*
+ * If a connection label was passed use that, else attempt to use
+ * the device name as label
+ */
+ status = gpiod_request(desc, con_id ? con_id : devname);
if (status < 0)
return ERR_PTR(status);