diff options
author | Andres Salomon <dilinger@queued.net> | 2011-02-10 17:54:24 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-18 12:33:21 -0800 |
commit | bbe963f1b98c90980e33086d726f0963e286d1b4 (patch) | |
tree | 19b7a735621df7cdf9714beca67b3f7c97333088 /drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | |
parent | 097cd83a4c312e1ae0d9c14526f846666cab4f3a (diff) |
staging: olpc_dcon: move more variables into dcon_priv
This moves dcon_source and dcon_pending into the dcon_priv struct.
Because these variables are used by the IRQ handler (which is
registered in the model-specific callbacks), we end up needing
to move dcon_priv into olpc_dcon.h. This also changes the IRQ
registration to use the dcon_priv pointer as dev_id, instead of
dcon_driver.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c')
-rw-r--r-- | drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c b/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c index d4c2d7482c3..e213b63f811 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c +++ b/drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c @@ -57,7 +57,7 @@ static int dcon_was_irq(void) return 0; } -static int dcon_init_xo_1_5(void) +static int dcon_init_xo_1_5(struct dcon_priv *dcon) { unsigned int irq; u_int8_t tmp; @@ -96,20 +96,19 @@ static int dcon_init_xo_1_5(void) /* Determine the current state of DCONLOAD, likely set by firmware */ /* GPIO1 */ - dcon_source = (inl(VX855_GENL_PURPOSE_OUTPUT) & 0x1000) ? + dcon->curr_src = (inl(VX855_GENL_PURPOSE_OUTPUT) & 0x1000) ? DCON_SOURCE_CPU : DCON_SOURCE_DCON; - dcon_pending = dcon_source; + dcon->pending_src = dcon->curr_src; pci_dev_put(pdev); /* we're sharing the IRQ with ACPI */ irq = acpi_gbl_FADT.sci_interrupt; - if (request_irq(irq, &dcon_interrupt, IRQF_SHARED, "DCON", &dcon_driver)) { + if (request_irq(irq, &dcon_interrupt, IRQF_SHARED, "DCON", dcon)) { printk(KERN_ERR PREFIX "DCON (IRQ%d) allocation failed\n", irq); return 1; } - return 0; } |