diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-12-29 15:06:38 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-15 19:08:35 -0500 |
commit | 290b799c390d77d27effee3ce312203aaa32ee74 (patch) | |
tree | a9dcf0b1fdc9e1aacff90afb5b3ab79983115dcc /drivers/input/mouse/psmouse-base.c | |
parent | 97ae2b5c17d6cc988c6d49ae0cf95befb6b7081c (diff) |
Input: psmouse - use IS_ENABLED instead of homegrown code
Instead of having various protocols provide <protocol>_supported()
functions, let's use IS_ENABLED() macro that works well in "if" statements.
Acked-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
-rw-r--r-- | drivers/input/mouse/psmouse-base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 68469feda470..4ccd01d7a48d 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -727,7 +727,7 @@ static int psmouse_extensions(struct psmouse *psmouse, | |||
727 | if (psmouse_do_detect(focaltech_detect, psmouse, set_properties) == 0) { | 727 | if (psmouse_do_detect(focaltech_detect, psmouse, set_properties) == 0) { |
728 | if (max_proto > PSMOUSE_IMEX) { | 728 | if (max_proto > PSMOUSE_IMEX) { |
729 | if (!set_properties || focaltech_init(psmouse) == 0) { | 729 | if (!set_properties || focaltech_init(psmouse) == 0) { |
730 | if (focaltech_supported()) | 730 | if (IS_ENABLED(CONFIG_MOUSE_PS2_FOCALTECH)) |
731 | return PSMOUSE_FOCALTECH; | 731 | return PSMOUSE_FOCALTECH; |
732 | /* | 732 | /* |
733 | * Note that we need to also restrict | 733 | * Note that we need to also restrict |
@@ -776,7 +776,7 @@ static int psmouse_extensions(struct psmouse *psmouse, | |||
776 | * Try activating protocol, but check if support is enabled first, since | 776 | * Try activating protocol, but check if support is enabled first, since |
777 | * we try detecting Synaptics even when protocol is disabled. | 777 | * we try detecting Synaptics even when protocol is disabled. |
778 | */ | 778 | */ |
779 | if (synaptics_supported() && | 779 | if (IS_ENABLED(CONFIG_MOUSE_PS2_SYNAPTICS) && |
780 | (!set_properties || synaptics_init(psmouse) == 0)) { | 780 | (!set_properties || synaptics_init(psmouse) == 0)) { |
781 | return PSMOUSE_SYNAPTICS; | 781 | return PSMOUSE_SYNAPTICS; |
782 | } | 782 | } |
@@ -801,7 +801,7 @@ static int psmouse_extensions(struct psmouse *psmouse, | |||
801 | */ | 801 | */ |
802 | if (max_proto > PSMOUSE_IMEX && | 802 | if (max_proto > PSMOUSE_IMEX && |
803 | cypress_detect(psmouse, set_properties) == 0) { | 803 | cypress_detect(psmouse, set_properties) == 0) { |
804 | if (cypress_supported()) { | 804 | if (IS_ENABLED(CONFIG_MOUSE_PS2_CYPRESS)) { |
805 | if (cypress_init(psmouse) == 0) | 805 | if (cypress_init(psmouse) == 0) |
806 | return PSMOUSE_CYPRESS; | 806 | return PSMOUSE_CYPRESS; |
807 | 807 | ||