From patchwork Mon Mar 30 09:41:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 6119281 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5027FBF4A6 for ; Mon, 30 Mar 2015 09:42:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29BC220357 for ; Mon, 30 Mar 2015 09:42:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CB1C2034F for ; Mon, 30 Mar 2015 09:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752478AbbC3Jl6 (ORCPT ); Mon, 30 Mar 2015 05:41:58 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:33363 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752648AbbC3Jl6 (ORCPT ); Mon, 30 Mar 2015 05:41:58 -0400 Received: by wixm2 with SMTP id m2so81983057wix.0 for ; Mon, 30 Mar 2015 02:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=F9cvp3ytRU7gkp844JIBa6XPK5Cyfi+L0+PRjUv6MRU=; b=m9lswIiem0VbG+oL0Q1rXwf1JOo9WmsSmxWFNSl36KCMw14BKs1XauCaOd9FACqP96 GpJcU/HyOSAGyuNcaHrxefqnrrwm3H+0927kO8MWg/N3bfczCLCIBdOUoI5ngvbxs3ep 0cS4pHKQ6SPy8PE1z1PTZGYhWJaQ1ff/P62P+S+/BcQ1UmMNwdPASiFbey+3fixpT7rd 3wMMQkCA1oUk3lfslP/u7jGG1meIRSL/5M3POaynhQRsxw4uWPIY4UV23R4d4faHw7P3 NzAhZtrFm9sbDHn0W/1xu0omqn4ROnoCXJ2qaaOq9AXTR8fbJfUImxdp4h8yKCPK970F uBXQ== X-Received: by 10.194.122.196 with SMTP id lu4mr62325420wjb.154.1427708517095; Mon, 30 Mar 2015 02:41:57 -0700 (PDT) Received: from anuminas.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id w8sm14948932wja.4.2015.03.30.02.41.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Mar 2015 02:41:56 -0700 (PDT) From: Dmitry Eremin-Solenikov To: Vinod Koul , Dan Williams , Russell King Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] dmaengine: sa11x0: fix boot-time warning Date: Mon, 30 Mar 2015 12:41:50 +0300 Message-Id: <1427708510-17370-1-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the following warning by initializing directions field in the dma_device structure. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at drivers/dma/dmaengine.c:863 dma_async_device_register+0x2b4/0x4f0() this driver doesn't support generic slave capabilities reporting Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.0.0-rc5+ #10 Hardware name: Sharp-Collie [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (warn_slowpath_common+0x74/0xac) [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [] (warn_slowpath_fmt) from [] (dma_async_device_register+0x2b4/0x4f0) [] (dma_async_device_register) from [] (sa11x0_dma_probe+0x21c/0x358) [] (sa11x0_dma_probe) from [] (platform_drv_probe+0x30/0x94) [] (platform_drv_probe) from [] (driver_probe_device+0x84/0x234) [] (driver_probe_device) from [] (__driver_attach+0x98/0x9c) [] (__driver_attach) from [] (bus_for_each_dev+0x74/0xa4) [] (bus_for_each_dev) from [] (bus_add_driver+0x13c/0x1e8) [] (bus_add_driver) from [] (driver_register+0x78/0xf8) [] (driver_register) from [] (do_one_initcall+0x84/0x1f4) [] (do_one_initcall) from [] (kernel_init_freeable+0xf8/0x1b4) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xf0) [] (kernel_init) from [] (ret_from_fork+0x14/0x2c) ---[ end trace e188b8fe0e782e75 ]--- Signed-off-by: Dmitry Eremin-Solenikov --- drivers/dma/sa11x0-dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c index 5adf540..bb7ddd6 100644 --- a/drivers/dma/sa11x0-dma.c +++ b/drivers/dma/sa11x0-dma.c @@ -948,6 +948,7 @@ static int sa11x0_dma_probe(struct platform_device *pdev) dma_cap_set(DMA_CYCLIC, d->slave.cap_mask); d->slave.device_prep_slave_sg = sa11x0_dma_prep_slave_sg; d->slave.device_prep_dma_cyclic = sa11x0_dma_prep_dma_cyclic; + d->slave.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); ret = sa11x0_dma_init_dmadev(&d->slave, &pdev->dev); if (ret) { dev_warn(d->slave.dev, "failed to register slave async device: %d\n",