summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>2016-01-11 12:30:34 -0800
committerRohit Vaswani <rvaswani@codeaurora.org>2016-03-01 12:22:48 -0800
commit2ffbfdcb1db48a7bd902bb0b28c04fca9a3688d4 (patch)
tree1feeadc1f2156f829d31ecb36f40e64b5d2c2ad0
parent1f314dfa8f7be08155e096ad59954159fc534f5b (diff)
spmi: pmic_arb: remove struct pmic_arb_irq_spec
struct pmic_arb_irq_spec serves no real purpose. It is used only in the translate function and the code is much cleaner without it. Change-Id: I4daae954b8e01b33a9c7f5a343a31c15b4787382 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
-rw-r--r--drivers/spmi/spmi-pmic-arb.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 01a9f8d5515e..30211248edb6 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -705,12 +705,6 @@ static struct irq_chip pmic_arb_irqchip = {
| IRQCHIP_SKIP_SET_WAKE,
};
-struct spmi_pmic_arb_irq_spec {
- unsigned slave:4;
- unsigned per:8;
- unsigned irq:3;
-};
-
static int qpnpint_irq_domain_dt_translate(struct irq_domain *d,
struct device_node *controller,
const u32 *intspec,
@@ -719,7 +713,6 @@ static int qpnpint_irq_domain_dt_translate(struct irq_domain *d,
unsigned int *out_type)
{
struct spmi_pmic_arb *pa = d->host_data;
- struct spmi_pmic_arb_irq_spec spec;
int rc;
u8 apid;
@@ -734,10 +727,6 @@ static int qpnpint_irq_domain_dt_translate(struct irq_domain *d,
if (intspec[0] > 0xF || intspec[1] > 0xFF || intspec[2] > 0x7)
return -EINVAL;
- spec.slave = intspec[0];
- spec.per = intspec[1];
- spec.irq = intspec[2];
-
rc = pa->ver_ops->ppid_to_apid(pa, intspec[0],
(intspec[1] << 8), &apid);
if (rc < 0) {
@@ -753,9 +742,9 @@ static int qpnpint_irq_domain_dt_translate(struct irq_domain *d,
if (apid < pa->min_apid)
pa->min_apid = apid;
- *out_hwirq = spec.slave << 24
- | spec.per << 16
- | spec.irq << 8
+ *out_hwirq = (intspec[0] & 0xF) << 24
+ | (intspec[1] & 0xFF) << 16
+ | (intspec[2] & 0x7) << 8
| apid;
*out_type = intspec[3] & IRQ_TYPE_SENSE_MASK;