From patchwork Mon May 4 20:13:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 21771 X-Patchwork-Delegate: kyle@mcmartin.ca Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n44KQfV3008452 for ; Mon, 4 May 2009 20:26:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755241AbZEDU0j (ORCPT ); Mon, 4 May 2009 16:26:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755036AbZEDU0j (ORCPT ); Mon, 4 May 2009 16:26:39 -0400 Received: from kroah.org ([198.145.64.141]:37873 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754227AbZEDU0i (ORCPT ); Mon, 4 May 2009 16:26:38 -0400 Received: from localhost (c-76-105-230-205.hsd1.or.comcast.net [76.105.230.205]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by coco.kroah.org (Postfix) with ESMTPSA id 3952548FAF; Mon, 4 May 2009 13:26:39 -0700 (PDT) Date: Mon, 4 May 2009 13:13:59 -0700 From: Greg Kroah-Hartman To: Helge Deller , Kyle McMartin Cc: linux-parisc@vger.kernel.org, Greg KH Subject: [PATCH] parisc: remove driver_data direct access of struct device Message-ID: <20090504201359.GA23098@kroah.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org From: Greg Kroah-Hartman In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: linux-parisc@vger.kernel.org Cc: Helge Deller Cc: Kyle McMartin Signed-off-by: Greg Kroah-Hartman Acked-by: Kyle McMartin --- drivers/parisc/eisa.c | 2 +- drivers/parisc/sba_iommu.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c @@ -373,7 +373,7 @@ static int __init eisa_probe(struct pari if (result >= 0) { /* FIXME : Don't enumerate the bus twice. */ eisa_dev.root.dev = &dev->dev; - dev->dev.driver_data = &eisa_dev.root; + dev_set_drvdata(&dev->dev, &eisa_dev.root); eisa_dev.root.bus_base_addr = 0; eisa_dev.root.res = &eisa_dev.hba.io_space; eisa_dev.root.slots = result; --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c @@ -2010,7 +2010,7 @@ void __init sba_init(void) void * sba_get_iommu(struct parisc_device *pci_hba) { struct parisc_device *sba_dev = parisc_parent(pci_hba); - struct sba_device *sba = sba_dev->dev.driver_data; + struct sba_device *sba = dev_get_drvdata(&sba_dev->dev); char t = sba_dev->id.hw_type; int iocnum = (pci_hba->hw_path >> 3); /* rope # */ @@ -2031,7 +2031,7 @@ void * sba_get_iommu(struct parisc_devic void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r) { struct parisc_device *sba_dev = parisc_parent(pci_hba); - struct sba_device *sba = sba_dev->dev.driver_data; + struct sba_device *sba = dev_get_drvdata(&sba_dev->dev); char t = sba_dev->id.hw_type; int i; int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ @@ -2073,7 +2073,7 @@ void sba_directed_lmmio(struct parisc_de void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r ) { struct parisc_device *sba_dev = parisc_parent(pci_hba); - struct sba_device *sba = sba_dev->dev.driver_data; + struct sba_device *sba = dev_get_drvdata(&sba_dev->dev); char t = sba_dev->id.hw_type; int base, size; int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */