From patchwork Fri Jun 4 02:37:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 104203 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o542cM7X010320 for ; Fri, 4 Jun 2010 02:38:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932133Ab0FDCi3 (ORCPT ); Thu, 3 Jun 2010 22:38:29 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:50715 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757036Ab0FDCi3 (ORCPT ); Thu, 3 Jun 2010 22:38:29 -0400 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id o542bTa5019556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Jun 2010 19:37:30 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id o542bOww001409; Thu, 3 Jun 2010 19:37:25 -0700 Message-Id: <201006040237.o542bOww001409@imap1.linux-foundation.org> Subject: [patch 1/5] ssb: add dma_dev to ssb_device structure To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, akpm@linux-foundation.org, fujita.tomonori@lab.ntt.co.jp, Larry.Finger@lwfinger.net, davem@davemloft.net, mb@bu3sch.de, stefano.brivio@polimi.it, zambrano@broadcom.com From: akpm@linux-foundation.org Date: Thu, 03 Jun 2010 19:37:27 -0700 MIME-Version: 1.0 X-Spam-Status: No, hits=-3.496 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 04 Jun 2010 02:38:30 +0000 (UTC) diff -puN drivers/ssb/main.c~ssb-add-dma_dev-to-ssb_device-structure drivers/ssb/main.c --- a/drivers/ssb/main.c~ssb-add-dma_dev-to-ssb_device-structure +++ a/drivers/ssb/main.c @@ -486,6 +486,7 @@ static int ssb_devices_register(struct s #ifdef CONFIG_SSB_PCIHOST sdev->irq = bus->host_pci->irq; dev->parent = &bus->host_pci->dev; + sdev->dma_dev = dev->parent; #endif break; case SSB_BUSTYPE_PCMCIA: @@ -501,6 +502,7 @@ static int ssb_devices_register(struct s break; case SSB_BUSTYPE_SSB: dev->dma_mask = &dev->coherent_dma_mask; + sdev->dma_dev = dev; break; } diff -puN include/linux/ssb/ssb.h~ssb-add-dma_dev-to-ssb_device-structure include/linux/ssb/ssb.h --- a/include/linux/ssb/ssb.h~ssb-add-dma_dev-to-ssb_device-structure +++ a/include/linux/ssb/ssb.h @@ -167,7 +167,7 @@ struct ssb_device { * is an optimization. */ const struct ssb_bus_ops *ops; - struct device *dev; + struct device *dev, *dma_dev; struct ssb_bus *bus; struct ssb_device_id id;