Input: ams_delta_serio: Get FIQ buffer from platform_data
Instead of exporting the FIQ buffer symbol to be used in ams-delta-serio driver, pass it to the driver as platform_data. Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:

committed by
Tony Lindgren

父節點
a617b36bbc
當前提交
5f73861fae
@@ -40,8 +40,7 @@ static struct fiq_handler fh = {
|
||||
* keystrokes received from the qwerty keyboard. See
|
||||
* <linux/platform_data/ams-delta-fiq.h> for details of offsets.
|
||||
*/
|
||||
unsigned int fiq_buffer[1024];
|
||||
EXPORT_SYMBOL(fiq_buffer);
|
||||
static unsigned int fiq_buffer[1024];
|
||||
|
||||
static struct irq_chip *irq_chip;
|
||||
static struct irq_data *irq_data[16];
|
||||
@@ -203,9 +202,10 @@ void __init ams_delta_init_fiq(struct gpio_chip *chip,
|
||||
val = omap_readl(OMAP_IH1_BASE + offset) | 1;
|
||||
omap_writel(val, OMAP_IH1_BASE + offset);
|
||||
|
||||
/* Initialize serio device IRQ resource */
|
||||
/* Initialize serio device IRQ resource and platform_data */
|
||||
serio->resource[0].start = gpiod_to_irq(clk);
|
||||
serio->resource[0].end = serio->resource[0].start;
|
||||
serio->dev.platform_data = fiq_buffer;
|
||||
|
||||
/*
|
||||
* Since FIQ handler performs handling of GPIO registers for
|
||||
|
@@ -537,6 +537,14 @@ static struct resource ams_delta_serio_resources[] = {
|
||||
static struct platform_device ams_delta_serio_device = {
|
||||
.name = "ams-delta-serio",
|
||||
.id = PLATFORM_DEVID_NONE,
|
||||
.dev = {
|
||||
/*
|
||||
* Initialize .platform_data explicitly with NULL to
|
||||
* indicate it is going to be used. It will be replaced
|
||||
* with FIQ buffer address as soon as FIQ is initialized.
|
||||
*/
|
||||
.platform_data = NULL,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(ams_delta_serio_resources),
|
||||
.resource = ams_delta_serio_resources,
|
||||
};
|
||||
|
Reference in New Issue
Block a user