public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Pete Eberlein <pete@sensoray.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 05/16] go7007: Don't use module names to load I2C modules
Date: Thu, 07 Oct 2010 09:33:19 -0700	[thread overview]
Message-ID: <1286469199.2477.11.camel@pete-desktop> (raw)
In-Reply-To: <1285337654-5044-6-git-send-email-laurent.pinchart@ideasonboard.com>

Acked-by: Pete Eberlein <pete@sensoray.com>

On Fri, 2010-09-24 at 16:14 +0200, Laurent Pinchart wrote:
> With the v4l2_i2c_new_subdev* functions now supporting loading modules
> based on modaliases, replace the hardcoded module name passed to those
> functions by NULL.
> 
> All corresponding I2C modules have been checked, and all of them include
> a module aliases table with names corresponding to what the go7007
> driver uses.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/staging/go7007/go7007-driver.c |   43 ++-----------------------------
>  1 files changed, 3 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/staging/go7007/go7007-driver.c b/drivers/staging/go7007/go7007-driver.c
> index 372a7c6..0a1d925 100644
> --- a/drivers/staging/go7007/go7007-driver.c
> +++ b/drivers/staging/go7007/go7007-driver.c
> @@ -194,51 +194,15 @@ int go7007_reset_encoder(struct go7007 *go)
>   * Attempt to instantiate an I2C client by ID, probably loading a module.
>   */
>  static int init_i2c_module(struct i2c_adapter *adapter, const char *type,
> -			   int id, int addr)
> +			   int addr)
>  {
>  	struct go7007 *go = i2c_get_adapdata(adapter);
>  	struct v4l2_device *v4l2_dev = &go->v4l2_dev;
> -	char *modname;
>  
> -	switch (id) {
> -	case I2C_DRIVERID_WIS_SAA7115:
> -		modname = "wis-saa7115";
> -		break;
> -	case I2C_DRIVERID_WIS_SAA7113:
> -		modname = "wis-saa7113";
> -		break;
> -	case I2C_DRIVERID_WIS_UDA1342:
> -		modname = "wis-uda1342";
> -		break;
> -	case I2C_DRIVERID_WIS_SONY_TUNER:
> -		modname = "wis-sony-tuner";
> -		break;
> -	case I2C_DRIVERID_WIS_TW9903:
> -		modname = "wis-tw9903";
> -		break;
> -	case I2C_DRIVERID_WIS_TW2804:
> -		modname = "wis-tw2804";
> -		break;
> -	case I2C_DRIVERID_WIS_OV7640:
> -		modname = "wis-ov7640";
> -		break;
> -	case I2C_DRIVERID_S2250:
> -		modname = "s2250";
> -		break;
> -	default:
> -		modname = NULL;
> -		break;
> -	}
> -
> -	if (v4l2_i2c_new_subdev(v4l2_dev, adapter, modname, type, addr, NULL))
> +	if (v4l2_i2c_new_subdev(v4l2_dev, adapter, NULL, type, addr, NULL))
>  		return 0;
>  
> -	if (modname != NULL)
> -		printk(KERN_INFO
> -			"go7007: probing for module %s failed\n", modname);
> -	else
> -		printk(KERN_INFO
> -			"go7007: sensor %u seems to be unsupported!\n", id);
> +	printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", type);
>  	return -1;
>  }
>  
> @@ -277,7 +241,6 @@ int go7007_register_encoder(struct go7007 *go)
>  		for (i = 0; i < go->board_info->num_i2c_devs; ++i)
>  			init_i2c_module(&go->i2c_adapter,
>  					go->board_info->i2c_devs[i].type,
> -					go->board_info->i2c_devs[i].id,
>  					go->board_info->i2c_devs[i].addr);
>  		if (go->board_id == GO7007_BOARDID_ADLINK_MPG24)
>  			i2c_clients_command(&go->i2c_adapter,



  reply	other threads:[~2010-10-07 16:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24 14:13 [PATCH 00/16] Use modaliases to load I2C modules - please review Laurent Pinchart
2010-09-24 14:13 ` [PATCH 01/16] v4l: Load I2C modules based on modalias Laurent Pinchart
2010-09-24 14:14 ` [PATCH 02/16] v4l: Remove hardcoded module names passed to v4l2_i2c_new_subdev* Laurent Pinchart
2010-09-24 14:14 ` [PATCH 03/16] go7007: Add MODULE_DEVICE_TABLE to the go7007 I2C modules Laurent Pinchart
2010-10-07 16:33   ` Pete Eberlein
2010-09-24 14:14 ` [PATCH 04/16] go7007: Fix the TW2804 I2C type name Laurent Pinchart
2010-10-07 16:33   ` Pete Eberlein
2010-09-24 14:14 ` [PATCH 05/16] go7007: Don't use module names to load I2C modules Laurent Pinchart
2010-10-07 16:33   ` Pete Eberlein [this message]
2010-09-24 14:14 ` [PATCH 06/16] zoran: " Laurent Pinchart
2010-09-24 14:14 ` [PATCH 07/16] pvrusb2: " Laurent Pinchart
2010-10-03 20:07   ` Mike Isely
2010-09-24 14:14 ` [PATCH 08/16] sh_vou: " Laurent Pinchart
2010-09-24 14:14 ` [PATCH 09/16] radio-si4713: " Laurent Pinchart
2010-09-24 14:14 ` [PATCH 10/16] soc_camera: " Laurent Pinchart
2010-09-24 14:14 ` [PATCH 11/16] vpfe_capture: " Laurent Pinchart
2010-09-24 14:14 ` [PATCH 12/16] vpif_display: " Laurent Pinchart
2010-09-24 14:14 ` [PATCH 13/16] vpif_capture: " Laurent Pinchart
2010-09-24 14:14 ` [PATCH 14/16] ivtv: " Laurent Pinchart
2010-09-24 14:14 ` [PATCH 15/16] cx18: " Laurent Pinchart
2010-09-24 14:14 ` [PATCH 16/16] v4l: Remove module_name argument to the v4l2_i2c_new_subdev* functions Laurent Pinchart
2010-10-03 20:07   ` Mike Isely
2010-09-24 19:00 ` [PATCH 00/16] Use modaliases to load I2C modules - please review Guennadi Liakhovetski
2010-10-05 16:41   ` Guennadi Liakhovetski
2010-10-05 16:45     ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286469199.2477.11.camel@pete-desktop \
    --to=pete@sensoray.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox