From ef10deecd9b9132ed239b4a140b8ef560c5c3c34 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 22 Apr 2008 14:42:08 -0300 Subject: [PATCH] --- yaml --- r: 92383 b: refs/heads/master c: b4333a3baecfeee35317c03cf08952cc04bd149a h: refs/heads/master i: 92381: ed0c57c5eaeae4e185a2ab03f039b8065bed2ded 92379: 60d70ba79c42dee1ec7f6fbf2d12afdcba05b721 92375: bab6db8e1f549a5f0fcc5ed77c38a9366c2b54b7 92367: e35a9b9e5432118b0e1da0240678453424a854f6 92351: 97aee39585b4e9fb7407195eb69a4b224bd27f08 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/mt9m001.c | 10 +++++----- trunk/drivers/media/video/mt9v022.c | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index f34dfe6356ee..f3aa20b6bfd0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 12afe3781870cad7b6bbe83a2f8c4dd9ec7bf214 +refs/heads/master: b4333a3baecfeee35317c03cf08952cc04bd149a diff --git a/trunk/drivers/media/video/mt9m001.c b/trunk/drivers/media/video/mt9m001.c index 3c5867c378d3..b65ff7745b8d 100644 --- a/trunk/drivers/media/video/mt9m001.c +++ b/trunk/drivers/media/video/mt9m001.c @@ -154,7 +154,7 @@ static int bus_switch_request(struct mt9m001 *mt9m001, int ret; unsigned int gpio = icl->gpio; - if (gpio != NO_GPIO) { + if (gpio_is_valid(gpio)) { /* We have a data bus switch. */ ret = gpio_request(gpio, "mt9m001"); if (ret < 0) { @@ -174,7 +174,7 @@ static int bus_switch_request(struct mt9m001 *mt9m001, mt9m001->switch_gpio = gpio; #else - mt9m001->switch_gpio = NO_GPIO; + mt9m001->switch_gpio = -EINVAL; #endif return 0; } @@ -182,7 +182,7 @@ static int bus_switch_request(struct mt9m001 *mt9m001, static void bus_switch_release(struct mt9m001 *mt9m001) { #ifdef CONFIG_MT9M001_PCA9536_SWITCH - if (mt9m001->switch_gpio != NO_GPIO) + if (gpio_is_valid(mt9m001->switch_gpio)) gpio_free(mt9m001->switch_gpio); #endif } @@ -190,7 +190,7 @@ static void bus_switch_release(struct mt9m001 *mt9m001) static int bus_switch_act(struct mt9m001 *mt9m001, int go8bit) { #ifdef CONFIG_MT9M001_PCA9536_SWITCH - if (mt9m001->switch_gpio == NO_GPIO) + if (!gpio_is_valid(mt9m001->switch_gpio)) return -ENODEV; gpio_set_value_cansleep(mt9m001->switch_gpio, go8bit); @@ -224,7 +224,7 @@ static int mt9m001_set_capture_format(struct soc_camera_device *icd, (mt9m001->datawidth != 9 && (width_flag == IS_DATAWIDTH_9)) || (mt9m001->datawidth != 8 && (width_flag == IS_DATAWIDTH_8))) { /* data width switch requested */ - if (mt9m001->switch_gpio == NO_GPIO) + if (!gpio_is_valid(mt9m001->switch_gpio)) return -EINVAL; /* Well, we actually only can do 10 or 8 bits... */ diff --git a/trunk/drivers/media/video/mt9v022.c b/trunk/drivers/media/video/mt9v022.c index 9b406e41902a..5fbeaa305f35 100644 --- a/trunk/drivers/media/video/mt9v022.c +++ b/trunk/drivers/media/video/mt9v022.c @@ -187,7 +187,7 @@ static int bus_switch_request(struct mt9v022 *mt9v022, struct soc_camera_link *i int ret; unsigned int gpio = icl->gpio; - if (gpio != NO_GPIO) { + if (gpio_is_valid(gpio)) { /* We have a data bus switch. */ ret = gpio_request(gpio, "mt9v022"); if (ret < 0) { @@ -206,7 +206,7 @@ static int bus_switch_request(struct mt9v022 *mt9v022, struct soc_camera_link *i mt9v022->switch_gpio = gpio; #else - mt9v022->switch_gpio = NO_GPIO; + mt9v022->switch_gpio = -EINVAL; #endif return 0; } @@ -214,7 +214,7 @@ static int bus_switch_request(struct mt9v022 *mt9v022, struct soc_camera_link *i static void bus_switch_release(struct mt9v022 *mt9v022) { #ifdef CONFIG_MT9V022_PCA9536_SWITCH - if (mt9v022->switch_gpio != NO_GPIO) + if (gpio_is_valid(mt9v022->switch_gpio)) gpio_free(mt9v022->switch_gpio); #endif } @@ -222,7 +222,7 @@ static void bus_switch_release(struct mt9v022 *mt9v022) static int bus_switch_act(struct mt9v022 *mt9v022, int go8bit) { #ifdef CONFIG_MT9V022_PCA9536_SWITCH - if (mt9v022->switch_gpio == NO_GPIO) + if (!gpio_is_valid(mt9v022->switch_gpio)) return -ENODEV; gpio_set_value_cansleep(mt9v022->switch_gpio, go8bit); @@ -303,7 +303,7 @@ static int mt9v022_set_capture_format(struct soc_camera_device *icd, (mt9v022->datawidth != 9 && (width_flag == IS_DATAWIDTH_9)) || (mt9v022->datawidth != 8 && (width_flag == IS_DATAWIDTH_8))) { /* data width switch requested */ - if (mt9v022->switch_gpio == NO_GPIO) + if (!gpio_is_valid(mt9v022->switch_gpio)) return -EINVAL; /* Well, we actually only can do 10 or 8 bits... */