haven: doorbell: Pass cap_table_entry as irq private

The threaded interrupt handler needs access to the cap_table_entry
structure and the clients passed in private data. All this information
is store in the cap_table_entry struct. Pass this in as irq private
data instead of the clients private pointer.

Change-Id: If2455704236f3531724d5c007210559391e5cfd8
Signed-off-by: Chris Lew <clew@codeaurora.org>
This commit is contained in:
Chris Lew 2020-03-10 12:21:24 -07:00
commit c4684eeb0a

View file

@ -247,17 +247,14 @@ int hh_dbl_reset(void *dbl_client_desc)
}
EXPORT_SYMBOL(hh_dbl_reset);
static irqreturn_t hh_dbl_rx_callback_thread(int irq, void *rx_priv_data)
static irqreturn_t hh_dbl_rx_callback_thread(int irq, void *data)
{
struct hh_dbl_cap_table *cap_table_entry;
cap_table_entry = container_of(rx_priv_data,
struct hh_dbl_cap_table, rx_priv_data);
struct hh_dbl_cap_table *cap_table_entry = data;
if (!cap_table_entry->rx_callback)
return IRQ_HANDLED;
cap_table_entry->rx_callback(irq, rx_priv_data);
cap_table_entry->rx_callback(irq, cap_table_entry->rx_priv_data);
return IRQ_HANDLED;
}
@ -373,7 +370,7 @@ void *hh_dbl_rx_register(enum hh_dbl_label label, dbl_rx_cb_t rx_cb, void *priv)
hh_dbl_rx_callback_thread,
IRQF_ONESHOT,
cap_table_entry->rx_irq_name,
priv);
cap_table_entry);
if (ret < 0) {
pr_err("%s: IRQ registration failed\n", __func__);