From: Andy Gross Date: Tue, 14 Jul 2015 03:48:17 +0000 (-0500) Subject: gpio: qcom-smp2p: Fix compile issues X-Git-Tag: KARO-TXSD-2017-03-24~88^2~32^2~28 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=07e530064dee479cd2d97212690316d4ec97383f;p=karo-tx-linux.git gpio: qcom-smp2p: Fix compile issues This patch fixes 64 bit compile issues Signed-off-by: Andy Gross --- diff --git a/drivers/gpio/gpio-qcom-smp2p.c b/drivers/gpio/gpio-qcom-smp2p.c index 5ace68a10e49..ad5daa9bfa46 100644 --- a/drivers/gpio/gpio-qcom-smp2p.c +++ b/drivers/gpio/gpio-qcom-smp2p.c @@ -171,15 +171,16 @@ static irqreturn_t qcom_smp2p_intr(int irq, void *data) u32 val; int ret; int i; + u8 tmp_name[SMP2P_MAX_ENTRY_NAME]; in = smp2p->in; /* Acquire smem item, if not already found */ if (!in) { ret = qcom_smem_get(pid, smem_id, (void **)&in, &size); - if (ret < 0 || size != ALIGN(sizeof(*in), 8)) { + if (ret < 0) { dev_err(smp2p->dev, - "Unable to acquire remote smp2p item\n"); + "Unable to acquire remote smp2p item\n"); return IRQ_HANDLED; } @@ -189,7 +190,9 @@ static irqreturn_t qcom_smp2p_intr(int irq, void *data) /* Match newly created entries */ for (i = smp2p->valid_entries; i < in->valid_entries; i++) { list_for_each_entry(entry, &smp2p->inbound, node) { - if (!strcmp(in->entries[i].name, entry->name)) { + memcpy_fromio(tmp_name, in->entries[i].name, + SMP2P_MAX_ENTRY_NAME); + if (!strcmp(tmp_name, entry->name)) { entry->value = &in->entries[i].value; break; } @@ -288,7 +291,7 @@ static int smp2p_irq_map(struct irq_domain *d, irq_set_chip_data(irq, entry); irq_set_nested_thread(irq, 1); -#ifdef CONFIG_ARM64 +#if defined(CONFIG_ARM64) || defined(CONFIG_ARM) set_irq_flags(irq, IRQF_VALID); #else irq_set_noprobe(virq);