retu-pwrbutton.c (1cb0aa88179b7a71c240529e9d781d7bbb43d2e8) | retu-pwrbutton.c (5298cc4cc753bbe4c530b41341834f6ef3344d0d) |
---|---|
1/* 2 * Retu power button driver. 3 * 4 * Copyright (C) 2004-2010 Nokia Corporation 5 * 6 * Original code written by Ari Saastamoinen, Juha Yrjölä and Felipe Balbi. 7 * Rewritten by Aaro Koskinen. 8 * --- 28 unchanged lines hidden (view full) --- 37 38 state = !(retu_read(rdev, RETU_REG_STATUS) & RETU_STATUS_PWRONX); 39 input_report_key(idev, KEY_POWER, state); 40 input_sync(idev); 41 42 return IRQ_HANDLED; 43} 44 | 1/* 2 * Retu power button driver. 3 * 4 * Copyright (C) 2004-2010 Nokia Corporation 5 * 6 * Original code written by Ari Saastamoinen, Juha Yrjölä and Felipe Balbi. 7 * Rewritten by Aaro Koskinen. 8 * --- 28 unchanged lines hidden (view full) --- 37 38 state = !(retu_read(rdev, RETU_REG_STATUS) & RETU_STATUS_PWRONX); 39 input_report_key(idev, KEY_POWER, state); 40 input_sync(idev); 41 42 return IRQ_HANDLED; 43} 44 |
45static int __devinit retu_pwrbutton_probe(struct platform_device *pdev) | 45static int retu_pwrbutton_probe(struct platform_device *pdev) |
46{ 47 struct retu_dev *rdev = dev_get_drvdata(pdev->dev.parent); 48 struct input_dev *idev; 49 int irq; 50 int error; 51 52 irq = platform_get_irq(pdev, 0); 53 if (irq < 0) --- 46 unchanged lines hidden --- | 46{ 47 struct retu_dev *rdev = dev_get_drvdata(pdev->dev.parent); 48 struct input_dev *idev; 49 int irq; 50 int error; 51 52 irq = platform_get_irq(pdev, 0); 53 if (irq < 0) --- 46 unchanged lines hidden --- |