From patchwork Fri Jan 9 23:57:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 42921 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5E87E2055F for ; Fri, 9 Jan 2015 23:58:45 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id ex7sf2473156wid.3 for ; Fri, 09 Jan 2015 15:58:44 -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=3oPn3G3LEj+S9ORXzeL2PJtEbiYmFh1Gu4XNK9zOfJ8=; b=Xvh9FBcmOwDiJcBmVNR9zLPsdwNlUlTQO+VXeQJWqa0VXJTXf7/ftF2y0RWw5njWzI A7xzryiZkmevQNxL2k4/s9T9nIyOfLuQCWGT8j4A8W8ywG2UTAQAHp7zFwttb4CP9ot1 2Rht2r6IcjLPwFbpbyYmU8nuZ8Cj3U6atMvR4hSxO4ugiQPnsq7/GFID3yD16pwAYxD+ jUYcY577Uz6NQSmqkA0Q5qvQ1Pog4LA6+/kbGVw4Wg4nt7XiD5fI+nH+Xma7sbv2Bcb4 kdxLVBodv9CRK88ydCZeklhKLgpYJ2yONd008wHA4Wf2X3Mqsu+AITlCrBHsIMMl7i9R 7QWA== X-Gm-Message-State: ALoCoQn5eSlNNO27+UEwiqmtck2bfmyTp2lYMQmlouHIIv3NpUnHLgGp3Zc6DHGAKtLwmubm+YXr X-Received: by 10.180.76.40 with SMTP id h8mr748292wiw.3.1420847924599; Fri, 09 Jan 2015 15:58:44 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.202.198 with SMTP id kk6ls440640lac.103.gmail; Fri, 09 Jan 2015 15:58:44 -0800 (PST) X-Received: by 10.112.140.196 with SMTP id ri4mr24189538lbb.55.1420847924407; Fri, 09 Jan 2015 15:58:44 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id i1si14598590lae.46.2015.01.09.15.58.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Jan 2015 15:58:44 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id gd6so17071567lab.3 for ; Fri, 09 Jan 2015 15:58:44 -0800 (PST) X-Received: by 10.112.26.135 with SMTP id l7mr15613055lbg.56.1420847923997; Fri, 09 Jan 2015 15:58:43 -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 c8csp479242lbb; Fri, 9 Jan 2015 15:58:43 -0800 (PST) X-Received: by 10.68.138.194 with SMTP id qs2mr27602362pbb.8.1420847922339; Fri, 09 Jan 2015 15:58:42 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jv6si15389680pbc.29.2015.01.09.15.58.41; Fri, 09 Jan 2015 15:58:42 -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 S1758296AbbAIX5r (ORCPT + 27 others); Fri, 9 Jan 2015 18:57:47 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:59551 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753890AbbAIX5h (ORCPT ); Fri, 9 Jan 2015 18:57:37 -0500 Received: by mail-pa0-f45.google.com with SMTP id lf10so21301565pab.4 for ; Fri, 09 Jan 2015 15:57:36 -0800 (PST) X-Received: by 10.66.102.2 with SMTP id fk2mr26965603pab.149.1420847856878; Fri, 09 Jan 2015 15:57:36 -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.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Jan 2015 15:57:36 -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 02/11] coresight-etb: use module_amba_driver to simplify the code Date: Fri, 9 Jan 2015 16:57:13 -0700 Message-Id: <1420847842-31769-3-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.215.44 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-etb10.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/coresight/coresight-etb10.c b/drivers/coresight/coresight-etb10.c index c922d4aded8a..a1da7020201b 100644 --- a/drivers/coresight/coresight-etb10.c +++ b/drivers/coresight/coresight-etb10.c @@ -521,17 +521,7 @@ static struct amba_driver etb_driver = { .id_table = etb_ids, }; -static int __init etb_init(void) -{ - return amba_driver_register(&etb_driver); -} -module_init(etb_init); - -static void __exit etb_exit(void) -{ - amba_driver_unregister(&etb_driver); -} -module_exit(etb_exit); +module_amba_driver(etb_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("CoreSight Embedded Trace Buffer driver");