From patchwork Fri Jan 9 23:57:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 42920 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C365B2055F for ; Fri, 9 Jan 2015 23:58:34 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id k14sf5653386wgh.2 for ; Fri, 09 Jan 2015 15:58:34 -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=Xsk0lJorAi5WYAJhXlrRx37wiBKVcGfB4uFV+ypLeqU=; b=ZpVetV6OrB7KBZ7kmYmNUYg6YaoBhG3G+9wa3ilIrodRtfaEGbzI56Fk6kTjfjW6gD hRPJFuEe0SsoiLnnHtg5LfwZ+H+w8nHL75Q1B21lPazFT6PS4wFXIfu/90JOgGerRv9k KhbuFXsNph2D/NQCRO5Oke/dIa03jYSx8tTC1IcVZzpMWVXFL7MBE8h/xpeYvNBbEW9L AqG6bBUU10/7LSFGPos0jCDLo9smF86Jbx+Gr8Zb5YE+HZ02Hvn+ADVXxtssJAMpL6Pk /9oN6AgccDImO/UkXMSXx6gfoeHDpjeOjj2GhrU3uvT36+lKRuimgy4cAs08WpZYbc75 1R6A== X-Gm-Message-State: ALoCoQlM7IXMMydOvj8PUVznErcGySba2xYljgxlHxe4G40EQy2rPnquhNHMZMmBI6BlRE8BBGRU X-Received: by 10.152.26.39 with SMTP id i7mr2351807lag.1.1420847913983; Fri, 09 Jan 2015 15:58:33 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.226 with SMTP id kt2ls481725lac.52.gmail; Fri, 09 Jan 2015 15:58:33 -0800 (PST) X-Received: by 10.112.168.164 with SMTP id zx4mr24412633lbb.28.1420847913644; Fri, 09 Jan 2015 15:58:33 -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 xb8si14535838lbb.109.2015.01.09.15.58.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Jan 2015 15:58:33 -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 z11so10605284lbi.6 for ; Fri, 09 Jan 2015 15:58:33 -0800 (PST) X-Received: by 10.112.14.6 with SMTP id l6mr24596359lbc.91.1420847913549; Fri, 09 Jan 2015 15:58:33 -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 c8csp479219lbb; Fri, 9 Jan 2015 15:58:32 -0800 (PST) X-Received: by 10.70.44.66 with SMTP id c2mr27233661pdm.51.1420847911826; Fri, 09 Jan 2015 15:58:31 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si5705562pat.42.2015.01.09.15.58.30; Fri, 09 Jan 2015 15:58:31 -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 S1758326AbbAIX5s (ORCPT + 27 others); Fri, 9 Jan 2015 18:57:48 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:42611 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753923AbbAIX5j (ORCPT ); Fri, 9 Jan 2015 18:57:39 -0500 Received: by mail-pa0-f42.google.com with SMTP id et14so21346515pad.1 for ; Fri, 09 Jan 2015 15:57:39 -0800 (PST) X-Received: by 10.66.65.165 with SMTP id y5mr27241411pas.146.1420847859279; Fri, 09 Jan 2015 15:57:39 -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.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Jan 2015 15:57:38 -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 04/11] coresight-tmc: use module_amba_driver to simplify the code Date: Fri, 9 Jan 2015 16:57:15 -0700 Message-Id: <1420847842-31769-5-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-tmc.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/coresight/coresight-tmc.c b/drivers/coresight/coresight-tmc.c index ce2c293f1707..3ff232f9ddf7 100644 --- a/drivers/coresight/coresight-tmc.c +++ b/drivers/coresight/coresight-tmc.c @@ -760,17 +760,7 @@ static struct amba_driver tmc_driver = { .id_table = tmc_ids, }; -static int __init tmc_init(void) -{ - return amba_driver_register(&tmc_driver); -} -module_init(tmc_init); - -static void __exit tmc_exit(void) -{ - amba_driver_unregister(&tmc_driver); -} -module_exit(tmc_exit); +module_amba_driver(tmc_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("CoreSight Trace Memory Controller driver");