From patchwork Thu Nov 11 13:33:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 317252 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oABDXTUk005006 for ; Thu, 11 Nov 2010 13:34:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756139Ab0KKNe2 (ORCPT ); Thu, 11 Nov 2010 08:34:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58874 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755670Ab0KKNe1 (ORCPT ); Thu, 11 Nov 2010 08:34:27 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oABDYRJZ013143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Nov 2010 08:34:27 -0500 Received: from pedra (vpn-228-194.phx2.redhat.com [10.3.228.194]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oABDXNjX027735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 11 Nov 2010 08:34:26 -0500 Date: Thu, 11 Nov 2010 11:33:14 -0200 From: Mauro Carvalho Chehab Cc: Linux Media Mailing List Subject: [PATCH 1/2] [media] rc: Allow specifying properties for i2c IR's Message-ID: <20101111113314.505c9e05@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 11 Nov 2010 13:34:29 +0000 (UTC) diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index aee8943..82834ea 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c @@ -270,6 +270,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) { char *ir_codes = NULL; const char *name = NULL; + struct ir_dev_props *props = NULL; u64 ir_type = IR_TYPE_UNKNOWN; struct IR_i2c *ir; struct input_dev *input_dev; @@ -337,6 +338,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) name = init_data->name; if (init_data->type) ir_type = init_data->type; + props = init_data->props; if (init_data->polling_interval) ir->polling_interval = init_data->polling_interval; @@ -388,7 +390,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) input_dev->name = ir->name; input_dev->phys = ir->phys; - err = ir_input_register(ir->input, ir->ir_codes, NULL, MODULE_NAME); + err = ir_input_register(ir->input, ir->ir_codes, props, MODULE_NAME); if (err) goto err_out_free; diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 8c37b5e..19ea5fa 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h @@ -47,5 +47,7 @@ struct IR_i2c_init_data { */ int (*get_key)(struct IR_i2c*, u32*, u32*); enum ir_kbd_get_key_fn internal_get_key_func; + + struct ir_dev_props *props; }; #endif