Input: adp5588-keys - do not try to disable interrupt 0

Commit dc748812fca0 ("Input: adp5588-keys - add support for pure gpio")
made having interrupt line optional for the device, however it neglected
to update suspend and resume handlers that try to disable interrupts
for the duration of suspend.

Fix this by checking if interrupt number assigned to the i2c device is
not 0 before trying to disable or reenable it.

Fixes: dc748812fca0 ("Input: adp5588-keys - add support for pure gpio")
Link: https://lore.kernel.org/r/Zv_2jEMYSWDw2gKs@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+4 -2
+4 -2
drivers/input/keyboard/adp5588-keys.c
··· 822 { 823 struct i2c_client *client = to_i2c_client(dev); 824 825 - disable_irq(client->irq); 826 827 return 0; 828 } ··· 832 { 833 struct i2c_client *client = to_i2c_client(dev); 834 835 - enable_irq(client->irq); 836 837 return 0; 838 }
··· 822 { 823 struct i2c_client *client = to_i2c_client(dev); 824 825 + if (client->irq) 826 + disable_irq(client->irq); 827 828 return 0; 829 } ··· 831 { 832 struct i2c_client *client = to_i2c_client(dev); 833 834 + if (client->irq) 835 + enable_irq(client->irq); 836 837 return 0; 838 }