From patchwork Fri Jan 9 23:57:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 42927 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 39D472055F for ; Sat, 10 Jan 2015 00:01:04 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id a1sf5669302wgh.3 for ; Fri, 09 Jan 2015 16:01:03 -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=1l2EsNJgZFf/JzCg9dFZmBTRBfyRQmK59nSRrdmf1VM=; b=Ia+Uusi1KiJEDtHCklnWgjmLIkfFjNJLj2xgqYTC818RPJRu06cKqfELbc0hPh8hJz EXh503jWHB6+F0wWDbto1zyaL9xgZKwtb8P8RGHXaXqt+TDXw67Mr20K3VnURARlRrzL sZ+Ghsf14eg9o0Uuqr1ERkZf67E5nT12XDHoervy1RIWQ5+a8olaxKJJ0HM95ELyaMOv dWNxVBB8uVdUWictTy8gormNef3ZZc1JHMLTbZiOgAY+ada9wJuToIzNBKcgBlG2myiY GASgnFI+FEiTHxUe/tx1iZeH/CYdZ6GL0C1jULxbfUjFeDdfZ7opzmNHp1md6adFFAQ2 oVrA== X-Gm-Message-State: ALoCoQnIRFtuSARAk6eCjfcjflbzwDHwgK8ZT8eCimzLuIpAp70ROK6nxP4owmtlUkQ/eNG6csRY X-Received: by 10.180.24.35 with SMTP id r3mr752910wif.0.1420848063510; Fri, 09 Jan 2015 16:01:03 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.1 with SMTP id s1ls491102lal.23.gmail; Fri, 09 Jan 2015 16:01:03 -0800 (PST) X-Received: by 10.112.160.104 with SMTP id xj8mr24446830lbb.62.1420848063163; Fri, 09 Jan 2015 16:01:03 -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 g8si14593698laf.55.2015.01.09.16.01.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Jan 2015 16:01:02 -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 gd6so17076859lab.3 for ; Fri, 09 Jan 2015 16:01:02 -0800 (PST) X-Received: by 10.152.115.146 with SMTP id jo18mr24682770lab.9.1420848062754; Fri, 09 Jan 2015 16:01:02 -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 c8csp479620lbb; Fri, 9 Jan 2015 16:01:02 -0800 (PST) X-Received: by 10.66.231.141 with SMTP id tg13mr27987409pac.122.1420848060986; Fri, 09 Jan 2015 16:01:00 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si5678206pdg.92.2015.01.09.16.01.00; Fri, 09 Jan 2015 16:01:00 -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 S1758541AbbAJAA5 (ORCPT + 27 others); Fri, 9 Jan 2015 19:00:57 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:63497 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754015AbbAIX5l (ORCPT ); Fri, 9 Jan 2015 18:57:41 -0500 Received: by mail-pd0-f170.google.com with SMTP id v10so20090010pde.1 for ; Fri, 09 Jan 2015 15:57:40 -0800 (PST) X-Received: by 10.70.52.161 with SMTP id u1mr27261574pdo.106.1420847860427; Fri, 09 Jan 2015 15:57:40 -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.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Jan 2015 15:57:39 -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 05/11] coresight-tpiu: use module_amba_driver to simplify the code Date: Fri, 9 Jan 2015 16:57:16 -0700 Message-Id: <1420847842-31769-6-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-tpiu.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/coresight/coresight-tpiu.c b/drivers/coresight/coresight-tpiu.c index ae101082791a..3b33af2416bb 100644 --- a/drivers/coresight/coresight-tpiu.c +++ b/drivers/coresight/coresight-tpiu.c @@ -201,17 +201,7 @@ static struct amba_driver tpiu_driver = { .id_table = tpiu_ids, }; -static int __init tpiu_init(void) -{ - return amba_driver_register(&tpiu_driver); -} -module_init(tpiu_init); - -static void __exit tpiu_exit(void) -{ - amba_driver_unregister(&tpiu_driver); -} -module_exit(tpiu_exit); +module_amba_driver(tpiu_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("CoreSight Trace Port Interface Unit driver");