From patchwork Thu Apr 18 21:35:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2462661 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3D5113FCA5 for ; Thu, 18 Apr 2013 21:36:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936547Ab3DRVgk (ORCPT ); Thu, 18 Apr 2013 17:36:40 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:49804 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936478Ab3DRVf7 (ORCPT ); Thu, 18 Apr 2013 17:35:59 -0400 Received: from axis700.grange (dslb-088-077-162-170.pools.arcor-ip.net [88.77.162.170]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0LaYbD-1UxZPG2lOp-00mK8y; Thu, 18 Apr 2013 23:35:57 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id C247340BD2; Thu, 18 Apr 2013 23:35:55 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1USwUl-0005eD-C2; Thu, 18 Apr 2013 23:35:55 +0200 From: Guennadi Liakhovetski To: linux-media@vger.kernel.org Cc: Laurent Pinchart , Guennadi Liakhovetski Subject: [PATCH 23/24] V4L2: mt9p031: add struct v4l2_subdev_platform_data to platform data Date: Thu, 18 Apr 2013 23:35:44 +0200 Message-Id: <1366320945-21591-24-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1366320945-21591-1-git-send-email-g.liakhovetski@gmx.de> References: <1366320945-21591-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:wJ0K2Pb78+y90sl2iLKF9uQThmhcOzFou8mYN37FKFp uMeGQ7mtAQI0fcqBaQr9KFGREb0SnWKxUNXHTihydjtcKvvmjx fOiOop6dDyDNKIyh0V4gzicP8oY4N3Pu3XyoFt4SKrPBCzFQRh A3F0F/pnOtTfosoma8w7Y0kxCObT9Nzl/ZKFIkZ4KcFweDDVEU pNc48au2BLOGNnmLUiecyWRSRMlGCCElTWSs76C1w0RIsR5gMP VfqGQnDXuESY4fJ9bcgRZ8vep5TGNICfAqLEfzGedXFfwpDOjB IhPYiuR8V6C9qS/WYiH7z/N19h51OBP1zPuwgTI0ILW944K7fc 1+e3qr9rl/Y6ffiRXM448AekpOhel3OsDbvO1YYbQDNw66gUi8 lQ5Dy8gkR6OliDu6acDg9YljLOXRaY5PFg= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Adding struct v4l2_subdev_platform_data to mt9p031's platform data allows the driver to use generic functions to manage sensor power supplies. Signed-off-by: Guennadi Liakhovetski --- drivers/media/i2c/mt9p031.c | 1 + include/media/mt9p031.h | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index 70f4525..ca2cc6e 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c @@ -1048,6 +1048,7 @@ static int mt9p031_probe(struct i2c_client *client, goto done; mt9p031->subdev.dev = &client->dev; + mt9p031->subdev.pdata = &pdata->sd_pdata; ret = v4l2_async_register_subdev(&mt9p031->subdev); done: diff --git a/include/media/mt9p031.h b/include/media/mt9p031.h index 0c97b19..7bf7b53 100644 --- a/include/media/mt9p031.h +++ b/include/media/mt9p031.h @@ -1,6 +1,8 @@ #ifndef MT9P031_H #define MT9P031_H +#include + struct v4l2_subdev; /* @@ -15,6 +17,7 @@ struct mt9p031_platform_data { int reset; int ext_freq; int target_freq; + struct v4l2_subdev_platform_data sd_pdata; }; #endif