diff options
| -rw-r--r-- | arch/arm/mach-davinci/include/mach/keyscan.h | 1 | ||||
| -rw-r--r-- | drivers/input/keyboard/davinci_keyscan.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/keyscan.h b/arch/arm/mach-davinci/include/mach/keyscan.h index b4e21a2976d1..7a560e05bda8 100644 --- a/arch/arm/mach-davinci/include/mach/keyscan.h +++ b/arch/arm/mach-davinci/include/mach/keyscan.h | |||
| @@ -29,6 +29,7 @@ enum davinci_matrix_types { | |||
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | struct davinci_ks_platform_data { | 31 | struct davinci_ks_platform_data { |
| 32 | int (*device_enable)(struct device *dev); | ||
| 32 | unsigned short *keymap; | 33 | unsigned short *keymap; |
| 33 | u32 keymapsize; | 34 | u32 keymapsize; |
| 34 | u8 rep:1; | 35 | u8 rep:1; |
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index 6e52d855f637..d410d7a52f1d 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c | |||
| @@ -174,6 +174,14 @@ static int __init davinci_ks_probe(struct platform_device *pdev) | |||
| 174 | struct davinci_ks_platform_data *pdata = pdev->dev.platform_data; | 174 | struct davinci_ks_platform_data *pdata = pdev->dev.platform_data; |
| 175 | int error, i; | 175 | int error, i; |
| 176 | 176 | ||
| 177 | if (pdata->device_enable) { | ||
| 178 | error = pdata->device_enable(dev); | ||
| 179 | if (error < 0) { | ||
| 180 | dev_dbg(dev, "device enable function failed\n"); | ||
| 181 | return error; | ||
| 182 | } | ||
| 183 | } | ||
| 184 | |||
| 177 | if (!pdata->keymap) { | 185 | if (!pdata->keymap) { |
| 178 | dev_dbg(dev, "no keymap from pdata\n"); | 186 | dev_dbg(dev, "no keymap from pdata\n"); |
| 179 | return -EINVAL; | 187 | return -EINVAL; |
