diff options
author | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2012-12-05 09:02:55 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-12-06 04:56:37 -0500 |
commit | 8a1bbb5319384dab6568ac2ce30d19b922413bec (patch) | |
tree | 078ef1cc985e25b3808b4fd31b1475a976648103 | |
parent | 29b45787d1f57f82a1c37ff5a47786c6a9dbedd8 (diff) |
HID: i2c-hid: remove extra .irq field in struct i2c_hid
There is no point in keeping the irq in i2c_hid as it's already
there in client.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/i2c-hid/i2c-hid.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index d00f1854cb82..c6630d442e78 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c | |||
@@ -135,8 +135,6 @@ struct i2c_hid { | |||
135 | 135 | ||
136 | unsigned long flags; /* device flags */ | 136 | unsigned long flags; /* device flags */ |
137 | 137 | ||
138 | int irq; /* the interrupt line irq */ | ||
139 | |||
140 | wait_queue_head_t wait; /* For waiting the interrupt */ | 138 | wait_queue_head_t wait; /* For waiting the interrupt */ |
141 | }; | 139 | }; |
142 | 140 | ||
@@ -736,8 +734,6 @@ static int __devinit i2c_hid_init_irq(struct i2c_client *client) | |||
736 | return ret; | 734 | return ret; |
737 | } | 735 | } |
738 | 736 | ||
739 | ihid->irq = client->irq; | ||
740 | |||
741 | return 0; | 737 | return 0; |
742 | } | 738 | } |
743 | 739 | ||
@@ -851,7 +847,7 @@ static int __devinit i2c_hid_probe(struct i2c_client *client, | |||
851 | hid = hid_allocate_device(); | 847 | hid = hid_allocate_device(); |
852 | if (IS_ERR(hid)) { | 848 | if (IS_ERR(hid)) { |
853 | ret = PTR_ERR(hid); | 849 | ret = PTR_ERR(hid); |
854 | goto err; | 850 | goto err_irq; |
855 | } | 851 | } |
856 | 852 | ||
857 | ihid->hid = hid; | 853 | ihid->hid = hid; |
@@ -881,10 +877,10 @@ static int __devinit i2c_hid_probe(struct i2c_client *client, | |||
881 | err_mem_free: | 877 | err_mem_free: |
882 | hid_destroy_device(hid); | 878 | hid_destroy_device(hid); |
883 | 879 | ||
884 | err: | 880 | err_irq: |
885 | if (ihid->irq) | 881 | free_irq(client->irq, ihid); |
886 | free_irq(ihid->irq, ihid); | ||
887 | 882 | ||
883 | err: | ||
888 | i2c_hid_free_buffers(ihid); | 884 | i2c_hid_free_buffers(ihid); |
889 | kfree(ihid); | 885 | kfree(ihid); |
890 | return ret; | 886 | return ret; |
@@ -912,10 +908,9 @@ static int __devexit i2c_hid_remove(struct i2c_client *client) | |||
912 | static int i2c_hid_suspend(struct device *dev) | 908 | static int i2c_hid_suspend(struct device *dev) |
913 | { | 909 | { |
914 | struct i2c_client *client = to_i2c_client(dev); | 910 | struct i2c_client *client = to_i2c_client(dev); |
915 | struct i2c_hid *ihid = i2c_get_clientdata(client); | ||
916 | 911 | ||
917 | if (device_may_wakeup(&client->dev)) | 912 | if (device_may_wakeup(&client->dev)) |
918 | enable_irq_wake(ihid->irq); | 913 | enable_irq_wake(client->irq); |
919 | 914 | ||
920 | /* Save some power */ | 915 | /* Save some power */ |
921 | i2c_hid_set_power(client, I2C_HID_PWR_SLEEP); | 916 | i2c_hid_set_power(client, I2C_HID_PWR_SLEEP); |