input: pmic8xxx-pwrkey: Keep pdata after probe
The missing bits from upstream vs internal version of this driver Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
@@ -30,10 +30,12 @@
|
|||||||
/**
|
/**
|
||||||
* struct pmic8xxx_pwrkey - pmic8xxx pwrkey information
|
* struct pmic8xxx_pwrkey - pmic8xxx pwrkey information
|
||||||
* @key_press_irq: key press irq number
|
* @key_press_irq: key press irq number
|
||||||
|
* @pdata: platform data
|
||||||
*/
|
*/
|
||||||
struct pmic8xxx_pwrkey {
|
struct pmic8xxx_pwrkey {
|
||||||
struct input_dev *pwr;
|
struct input_dev *pwr;
|
||||||
int key_press_irq;
|
int key_press_irq;
|
||||||
|
const struct pm8xxx_pwrkey_platform_data *pdata;
|
||||||
};
|
};
|
||||||
|
|
||||||
static irqreturn_t pwrkey_press_irq(int irq, void *_pwrkey)
|
static irqreturn_t pwrkey_press_irq(int irq, void *_pwrkey)
|
||||||
@@ -109,6 +111,8 @@ static int __devinit pmic8xxx_pwrkey_probe(struct platform_device *pdev)
|
|||||||
if (!pwrkey)
|
if (!pwrkey)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
pwrkey->pdata = pdata;
|
||||||
|
|
||||||
pwr = input_allocate_device();
|
pwr = input_allocate_device();
|
||||||
if (!pwr) {
|
if (!pwr) {
|
||||||
dev_dbg(&pdev->dev, "Can't allocate power button\n");
|
dev_dbg(&pdev->dev, "Can't allocate power button\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user