From patchwork Fri Feb 18 03:07:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andres Salomon X-Patchwork-Id: 83529 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2403BB70EC for ; Fri, 18 Feb 2011 14:12:24 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932513Ab1BRDLm (ORCPT ); Thu, 17 Feb 2011 22:11:42 -0500 Received: from LUNGE.MIT.EDU ([18.54.1.69]:51879 "EHLO lunge.queued.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932443Ab1BRDIM (ORCPT ); Thu, 17 Feb 2011 22:08:12 -0500 Received: from dev.queued.net (c-71-231-141-121.hsd1.wa.comcast.net [71.231.141.121]) by lunge.queued.net (Postfix) with ESMTPSA id ABCF0398290; Thu, 17 Feb 2011 22:08:06 -0500 (EST) From: Andres Salomon To: Samuel Ortiz Cc: Mark Brown , linux-kernel@vger.kernel.org, Wolfgang Grandegger , socketcan-core@lists.berlios.de, netdev@vger.kernel.org Subject: [PATCH 15/29] janz: mfd_cell is now implicitly available to drivers (v2) Date: Thu, 17 Feb 2011 19:07:22 -0800 Message-Id: <1297998456-7615-16-git-send-email-dilinger@queued.net> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1297998456-7615-1-git-send-email-dilinger@queued.net> References: <1297998456-7615-1-git-send-email-dilinger@queued.net> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The cell's platform_data is now accessed with a helper function; change clients to use that, and remove the now-unused data_size. v2: add some missing mfd/core.h includes. Signed-off-by: Andres Salomon --- drivers/gpio/janz-ttl.c | 3 ++- drivers/mfd/janz-cmodio.c | 1 - drivers/net/can/janz-ican3.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/janz-ttl.c b/drivers/gpio/janz-ttl.c index 813ac07..2514fb0 100644 --- a/drivers/gpio/janz-ttl.c +++ b/drivers/gpio/janz-ttl.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -149,7 +150,7 @@ static int __devinit ttl_probe(struct platform_device *pdev) struct resource *res; int ret; - pdata = pdev->dev.platform_data; + pdata = mfd_get_data(pdev); if (!pdata) { dev_err(dev, "no platform data\n"); ret = -ENXIO; diff --git a/drivers/mfd/janz-cmodio.c b/drivers/mfd/janz-cmodio.c index 36a166b..58de1e2 100644 --- a/drivers/mfd/janz-cmodio.c +++ b/drivers/mfd/janz-cmodio.c @@ -87,7 +87,6 @@ static int __devinit cmodio_setup_subdevice(struct cmodio_device *priv, /* Add platform data */ pdata->modno = modno; cell->platform_data = pdata; - cell->data_size = sizeof(*pdata); /* MODULbus registers -- PCI BAR3 is big-endian MODULbus access */ res->flags = IORESOURCE_MEM; diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c index 366f5cc..102b16c 100644 --- a/drivers/net/can/janz-ican3.c +++ b/drivers/net/can/janz-ican3.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -1643,7 +1644,7 @@ static int __devinit ican3_probe(struct platform_device *pdev) struct device *dev; int ret; - pdata = pdev->dev.platform_data; + pdata = mfd_get_data(pdev); if (!pdata) return -ENXIO;