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>
This commit is contained in:
Abhijeet Dharmapurikar 2016-01-11 12:30:34 -08:00 committed by Rohit Vaswani
parent 1f314dfa8f
commit 2ffbfdcb1d

View file

@ -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;