summaryrefslogtreecommitdiff
path: root/drivers/usb/host/fsl-mph-dr-of.c
diff options
context:
space:
mode:
authorNikhil Badola <nikhil.badola@freescale.com>2015-06-15 13:16:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-23 02:37:32 +0300
commit38aa420096e565fe9c98f9d9475fd168114501a9 (patch)
tree80c97580deddf84c76e70980c6f7d8b1c4c31e2b /drivers/usb/host/fsl-mph-dr-of.c
parent5fd3fc1c5384fe420ead51f41662ba563336fbea (diff)
downloadlinux-38aa420096e565fe9c98f9d9475fd168114501a9.tar.xz
drivers:usb:fsl: Replace macros with enumerated type
Replace macros with enumerated type to represent usb ip controller version Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/fsl-mph-dr-of.c')
-rw-r--r--drivers/usb/host/fsl-mph-dr-of.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index 5e0d60035216..219595637cb1 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
@@ -119,9 +119,9 @@ error:
static const struct of_device_id fsl_usb2_mph_dr_of_match[];
-static int usb_get_ver_info(struct device_node *np)
+static enum fsl_usb2_controller_ver usb_get_ver_info(struct device_node *np)
{
- int ver = -1;
+ enum fsl_usb2_controller_ver ver = FSL_USB_VER_NONE;
/*
* returns 1 for usb controller version 1.6
@@ -142,7 +142,7 @@ static int usb_get_ver_info(struct device_node *np)
else /* for previous controller versions */
ver = FSL_USB_VER_OLD;
- if (ver > -1)
+ if (ver > FSL_USB_VER_NONE)
return ver;
}
@@ -215,7 +215,7 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev)
pdata->controller_ver = usb_get_ver_info(np);
if (pdata->have_sysif_regs) {
- if (pdata->controller_ver < 0) {
+ if (pdata->controller_ver == FSL_USB_VER_NONE) {
dev_warn(&ofdev->dev, "Could not get controller version\n");
return -ENODEV;
}