From patchwork Fri Apr 9 14:08:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12194251 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07B1FC433B4 for ; Fri, 9 Apr 2021 14:11:15 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C3D060FF1 for ; Fri, 9 Apr 2021 14:11:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C3D060FF1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rv8I4NdP6sDYPE7x+dYGREhTNPy6OI9m6qT5o3385s4=; b=Mkzaa5QjXpXwfBU0HfwNKTDk8 7jbKyNCI4SMGYLPT859zoZdVT7UmpXAx9/Gm1JHyHuUvLf0ye+aRCZE9ri9bd8qYPByKiJZmWFc+N CKYKc4OdIBkgaoAExVy1a1IUAE76PSovNKXm+EXHjGmTYJYMsfYM+24P74FRTGQNK3HdKFAW5im4+ lpDSOIyFhxgIh8sciETXIGcJg5oNa5+Ut9owN8UsRz5L3bXbM5vkO9MeE/vv2GZy1zmk5t4dezTDi p9bIfBGRLJBZFem7ROG35pDSruk6EcBgmwjRcekAU/9nuawFHVPt1GOBzskHcWxePK3PSoazivYr4 xG9YmL8ug==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lUroj-000sev-2S; Fri, 09 Apr 2021 14:09:01 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUroX-000seD-4g for linux-arm-kernel@desiato.infradead.org; Fri, 09 Apr 2021 14:08:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mCNzw2wYH/2IVIIN3RXfystupPqj13GJMWZw5r3BkGk=; b=H9mhA8VQhVbQm3V3Qs/oEqGLa+ aa5pGDhV1SL54HC3lFBV1nZCMELCELKZh+2v2YPTVQlMQgV5CVrkcVtW5X1fUmt00Glj6nz1lW2dx L9dAZZ/fnRLc4+TB1iuG5L2H8ITPbqHOZuoXgATzADADGapuT0GADACTZacfIp2yl62uEYfoZkGsB Fn0WjV2Z9Rk3E/4oB30D6IlD0Tq4Pced2F7LH0Irr6wWwhMguEASWQo/82kSuQrLGizECKOp1Fsfa h5X4VHkTUCGIrywprNPzrnMmeDDQz9T55WwB1lVFnmI3VYxx9kkG/+EdMivapbZk8FVg09WcI2rJS FNZeE7+A==; Received: from mail-dm6nam12on2085.outbound.protection.outlook.com ([40.107.243.85] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lUroU-004ZZ8-Ht for linux-arm-kernel@lists.infradead.org; Fri, 09 Apr 2021 14:08:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iuqrnzfyagxA7yOGfAafTPCMJgx4Gcj+tXvQabJmVzsytVEMYk59P04Jn7nhrF9Ia69FMOEjy4QI4ApfknQNC8rl8KEQkRjl+xADCtOvK/5qd32SVHpBUegu8fTXpacrLT0gCelh4ayKzRSCKFnlSZ4pPIYutXxZzDcttrb9bmxtK9jwNm4cwgoSmlMpboFWDqLFzWUcQOemfIwuXrVrCz/ys1X/3MHxy0blFURtRgSx9kPCLme+po/tJxrNP0iCMxHa/iPjET3B7Px6frWeeimLo+u9ErZ9woh1FlUTUQ6Z4kLqwOBZ4CCeipfwky0j1ZaSfHtPSWlw7cRa4MbJFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mCNzw2wYH/2IVIIN3RXfystupPqj13GJMWZw5r3BkGk=; b=arXMysgRy5eDovWx8qzH71Lo0SKz2CjCtgoloK0H+5kOASc3BDkKxqeT/r2NLeFVHmbve7Yr8rPQLifs11bCNQUUpHl0DkxTvuuSMdQ5+/9BAm9f3S8qRqbTG+GWCj9ry0ihdrFjiWIXa1V9h8AfX8as7dZ1l6ys51BXbdBYVcZZTIUxHgs1+gkOYhNR5BYbjyLYBra8hSRRqIjp1sYAmFtWZXdVpkqPJVy/YSXMsgMVCaRh+Z2Z4Z/XI2bZzvY1NzWt8S/JLYJGoWL/jV15rQsaD7grV1TzcKUTECYy8Iy47P36VFjGSai3qOZ5zpgB2GQ19r2EmI07bmH5tONCqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=linaro.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mCNzw2wYH/2IVIIN3RXfystupPqj13GJMWZw5r3BkGk=; b=ALOeYLhkxfDyXCZIIZJhZCFmyEkqM/Y2pZS90hFhJWY7/9V9uYfLY3hlTePrBV8He4ieX2lxf6H7oCF+zUBum0vQ4g/+toeof+A3j6C4WIDr93fkb+2molY7Hz2PMSotc0EpvXI+R76oPQmKFk+qVKXtTDAeLcCwZLW14yb3Pw4= Received: from CY4PR16CA0019.namprd16.prod.outlook.com (2603:10b6:903:102::29) by BYAPR02MB4503.namprd02.prod.outlook.com (2603:10b6:a03:56::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.16; Fri, 9 Apr 2021 14:08:38 +0000 Received: from CY1NAM02FT058.eop-nam02.prod.protection.outlook.com (2603:10b6:903:102:cafe::21) by CY4PR16CA0019.outlook.office365.com (2603:10b6:903:102::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Fri, 9 Apr 2021 14:08:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT058.mail.protection.outlook.com (10.152.74.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4020.17 via Frontend Transport; Fri, 9 Apr 2021 14:08:37 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 9 Apr 2021 07:08:22 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2106.2 via Frontend Transport; Fri, 9 Apr 2021 07:08:22 -0700 Received: from [172.23.80.241] (port=38546 helo=xhdsneeli40x.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lUro4-0005KB-IS; Fri, 09 Apr 2021 07:08:21 -0700 From: Srinivas Neeli To: , , , , CC: , , , , Srinivas Neeli Subject: [PATCH 1/3] gpio: zynq: use module_platform_driver to simplify the code Date: Fri, 9 Apr 2021 19:38:04 +0530 Message-ID: <20210409140806.31824-2-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20210409140806.31824-1-srinivas.neeli@xilinx.com> References: <20210409140806.31824-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 888a38d7-70d1-4f7a-1af4-08d8fb60f8a5 X-MS-TrafficTypeDiagnostic: BYAPR02MB4503: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:497; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dKx85zHmvXcAGLC4otbgsommMTxFOpKkpa1YnNH2naLHOMg3DlxWZ0R6wghFFhM4svCEvBD2BVnItdYR4gVlD5VoFtfMDx+ncYHb/3izZKZxkV9Yn2TFDlBsXr2YFt08WAAWqNYFg4dCjjauEOoJlTJc7J6UumcDufzfj7Fe6KaR0XeBSc5fOT+8xH/F9KdARTikg9b7DjmLAhLmkJ4FRKT2tVKCyU7NOqd5M2XfFuomvh/rH9/+uYeMwiSPIB6YdmhUG0gD92SEYLea6aaQWvbDsx6n63iO2apImS/zSQFb5JRmtQOfovbQu4S69dqrBSIy46QhIaFhamA8C3n1pl1NpDhXviSy1VcVjzmuS2yUgaNtYJpvtPlD/FuSF9x1mYVU6WZVg1fO1R7/3VFzhh9y7Ca351NLjfV6JhEqfTaD0rghfejGgdAmcvRVBBzzQjSFyV7Jbh31YYRMoKYbKdCzWHZJZokv4bAlfcDOEr49Xft/jrudpscXhE3CROErp6RFhkQpB1x8hYEelJgB5l4DZ7+bMs2NQhw0Av9SlcDuGVn0QtFxJSc9hANzNGs4xukJ/srWHDIzumgpYSZ5iWphgWllmB9XojDLq3kQQ7hmXbU8bDufVT/y0iJPvRuizg/aSizfGyPHE0kSR8yAQf5rkq1VRZC/yJDsabaup8dbbHdspSgGiE/iDgoJeDLL X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(376002)(136003)(39860400002)(396003)(346002)(46966006)(36840700001)(83380400001)(1076003)(8936002)(2906002)(7636003)(356005)(70206006)(36756003)(47076005)(36860700001)(7696005)(9786002)(6636002)(4326008)(70586007)(336012)(316002)(107886003)(36906005)(82310400003)(44832011)(186003)(8676002)(2616005)(478600001)(54906003)(82740400003)(110136005)(6666004)(426003)(26005)(5660300002)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2021 14:08:37.9287 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 888a38d7-70d1-4f7a-1af4-08d8fb60f8a5 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT058.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4503 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210409_070846_612890_ACB9C373 X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Srinivas Neeli --- drivers/gpio/gpio-zynq.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index 3521c1dc3ac0..bb1ac0c5cf26 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -1020,22 +1020,7 @@ static struct platform_driver zynq_gpio_driver = { .remove = zynq_gpio_remove, }; -/** - * zynq_gpio_init - Initial driver registration call - * - * Return: value from platform_driver_register - */ -static int __init zynq_gpio_init(void) -{ - return platform_driver_register(&zynq_gpio_driver); -} -postcore_initcall(zynq_gpio_init); - -static void __exit zynq_gpio_exit(void) -{ - platform_driver_unregister(&zynq_gpio_driver); -} -module_exit(zynq_gpio_exit); +module_platform_driver(zynq_gpio_driver); MODULE_AUTHOR("Xilinx Inc."); MODULE_DESCRIPTION("Zynq GPIO driver");