From patchwork Fri Jan 9 23:57:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 42918 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6E3AC2055F for ; Fri, 9 Jan 2015 23:58:23 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e53sf9591232eek.3 for ; Fri, 09 Jan 2015 15:58:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ElpcPQy44L6MgLMEx6CVWB0y0Xv8vAlf5N7NNKiSbys=; b=iNyCWQcNe6iMNIeaHITjSZjTC9YnY1Bom+vE/wziNsCB/sXlVW6fV6ve7Lul5QiN1/ k9xoMoKv8UdhBO5MwiYSaOOfNPTlMsZhGl81goCuw6cGitteRcRd0Ka5rxxLj1Y2iR7s 94T/7IBrR7kEprUUSaM/nvplG6xfsQixaWBupsNUNgsR4hZCHlR7sSn1rHvRjuo37cjj vYhEsL0qmZ0gfRmLnsz+YcLLEFdzMV3LdL2NSKeltmIWOwfrsCL267cU9wZxao2u6N6z j5g5co+xgcr3wgE6DiF3P4O0P6jvEKG9cOoFFNLYgzLD5bjCpZSIrE57F+rxWTtMaaba ClDA== X-Gm-Message-State: ALoCoQlJy9v61IAyBYFzdz0GUgMdz7vdUTv9Rk99RFMQ6DmDErFetXt6IzoIHRqVx3/7NzesDfMo X-Received: by 10.194.95.74 with SMTP id di10mr2356216wjb.0.1420847902530; Fri, 09 Jan 2015 15:58:22 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.176 with SMTP id az16ls402924lab.87.gmail; Fri, 09 Jan 2015 15:58:22 -0800 (PST) X-Received: by 10.112.72.168 with SMTP id e8mr24373531lbv.83.1420847902336; Fri, 09 Jan 2015 15:58:22 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id ci4si14548238lad.93.2015.01.09.15.58.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Jan 2015 15:58:22 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id z11so10604882lbi.6 for ; Fri, 09 Jan 2015 15:58:22 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr24404397laz.71.1420847902194; Fri, 09 Jan 2015 15:58:22 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp479192lbb; Fri, 9 Jan 2015 15:58:21 -0800 (PST) X-Received: by 10.68.200.36 with SMTP id jp4mr27012962pbc.153.1420847900405; Fri, 09 Jan 2015 15:58:20 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pm2si15456741pdb.18.2015.01.09.15.58.19; Fri, 09 Jan 2015 15:58:20 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758359AbbAIX5u (ORCPT + 27 others); Fri, 9 Jan 2015 18:57:50 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:53065 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753904AbbAIX5i (ORCPT ); Fri, 9 Jan 2015 18:57:38 -0500 Received: by mail-pa0-f48.google.com with SMTP id rd3so21288137pab.7 for ; Fri, 09 Jan 2015 15:57:38 -0800 (PST) X-Received: by 10.66.140.102 with SMTP id rf6mr26594574pab.147.1420847858161; Fri, 09 Jan 2015 15:57:38 -0800 (PST) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [70.73.24.112]) by mx.google.com with ESMTPSA id od13sm8108693pdb.18.2015.01.09.15.57.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Jan 2015 15:57:37 -0800 (PST) From: mathieu.poirier@linaro.org To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org Subject: [PATCH 03/11] coresight-funnel: use module_amba_driver to simplify the code Date: Fri, 9 Jan 2015 16:57:14 -0700 Message-Id: <1420847842-31769-4-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1420847842-31769-1-git-send-email-mathieu.poirier@linaro.org> References: <1420847842-31769-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mathieu.poirier@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Wei Yongjun module_amba_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun Signed-off-by: Mathieu Poirier --- drivers/coresight/coresight-funnel.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/coresight/coresight-funnel.c b/drivers/coresight/coresight-funnel.c index 2108edffe1f4..3db36f70b666 100644 --- a/drivers/coresight/coresight-funnel.c +++ b/drivers/coresight/coresight-funnel.c @@ -252,17 +252,7 @@ static struct amba_driver funnel_driver = { .id_table = funnel_ids, }; -static int __init funnel_init(void) -{ - return amba_driver_register(&funnel_driver); -} -module_init(funnel_init); - -static void __exit funnel_exit(void) -{ - amba_driver_unregister(&funnel_driver); -} -module_exit(funnel_exit); +module_amba_driver(funnel_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("CoreSight Funnel driver");