Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53430
b: refs/heads/master
c: 373f971
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Apr 12, 2007
1 parent 02ac437 commit eff6cc4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b356872fa48a3f6b6f187444b0ea55e6e21c3575
refs/heads/master: 373f9713dccc8fc8e076157001a60133455c0550
9 changes: 5 additions & 4 deletions trunk/drivers/input/misc/ixp4xx-beeper.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static void ixp4xx_spkr_control(unsigned int pin, unsigned int count)

static int ixp4xx_spkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
{
unsigned int pin = (unsigned int) dev->private;
unsigned int pin = (unsigned int) input_get_drvdata(input_dev);
unsigned int count = 0;

if (type != EV_SND)
Expand Down Expand Up @@ -99,7 +99,8 @@ static int __devinit ixp4xx_spkr_probe(struct platform_device *dev)
if (!input_dev)
return -ENOMEM;

input_dev->private = (void *) dev->id;
input_set_drvdata(input_dev, (void *) dev->id);

input_dev->name = "ixp4xx beeper",
input_dev->phys = "ixp4xx/gpio";
input_dev->id.bustype = BUS_HOST;
Expand Down Expand Up @@ -136,7 +137,7 @@ static int __devinit ixp4xx_spkr_probe(struct platform_device *dev)
static int __devexit ixp4xx_spkr_remove(struct platform_device *dev)
{
struct input_dev *input_dev = platform_get_drvdata(dev);
unsigned int pin = (unsigned int) input_dev->private;
unsigned int pin = (unsigned int) input_get_drvdata(input_dev);

input_unregister_device(input_dev);
platform_set_drvdata(dev, NULL);
Expand All @@ -153,7 +154,7 @@ static int __devexit ixp4xx_spkr_remove(struct platform_device *dev)
static void ixp4xx_spkr_shutdown(struct platform_device *dev)
{
struct input_dev *input_dev = platform_get_drvdata(dev);
unsigned int pin = (unsigned int) input_dev->private;
unsigned int pin = (unsigned int) input_get_drvdata(input_dev);

/* turn off the speaker */
disable_irq(IRQ_IXP4XX_TIMER2);
Expand Down
10 changes: 4 additions & 6 deletions trunk/drivers/input/misc/uinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@

static int uinput_dev_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
{
struct uinput_device *udev;

udev = dev->private;
struct uinput_device *udev = input_get_drvdata(dev);

udev->buff[udev->head].type = type;
udev->buff[udev->head].code = code;
Expand Down Expand Up @@ -136,7 +134,7 @@ static int uinput_dev_upload_effect(struct input_dev *dev, struct ff_effect *eff
request.u.upload.effect = effect;
request.u.upload.old = old;

retval = uinput_request_reserve_slot(dev->private, &request);
retval = uinput_request_reserve_slot(input_get_drvdata(dev), &request);
if (!retval)
retval = uinput_request_submit(dev, &request);

Expand All @@ -156,7 +154,7 @@ static int uinput_dev_erase_effect(struct input_dev *dev, int effect_id)
request.code = UI_FF_ERASE;
request.u.effect_id = effect_id;

retval = uinput_request_reserve_slot(dev->private, &request);
retval = uinput_request_reserve_slot(input_get_drvdata(dev), &request);
if (!retval)
retval = uinput_request_submit(dev, &request);

Expand Down Expand Up @@ -274,7 +272,7 @@ static int uinput_allocate_device(struct uinput_device *udev)
return -ENOMEM;

udev->dev->event = uinput_dev_event;
udev->dev->private = udev;
input_set_drvdata(udev->dev, udev);

return 0;
}
Expand Down

0 comments on commit eff6cc4

Please sign in to comment.