From patchwork Sun Mar 27 17:00:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 8675961 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 245CB9F54E for ; Sun, 27 Mar 2016 17:01:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41AC620220 for ; Sun, 27 Mar 2016 17:01:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 44EE720219 for ; Sun, 27 Mar 2016 17:01:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752441AbcC0RBD (ORCPT ); Sun, 27 Mar 2016 13:01:03 -0400 Received: from mail.windriver.com ([147.11.1.11]:60795 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751586AbcC0RBC (ORCPT ); Sun, 27 Mar 2016 13:01:02 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id u2RH0sXg004699 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 27 Mar 2016 10:00:55 -0700 (PDT) Received: from yow-lpgnfs-02.corp.ad.wrs.com (128.224.149.8) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.248.2; Sun, 27 Mar 2016 10:00:54 -0700 From: Paul Gortmaker To: CC: Paul Gortmaker , "James E.J. Bottomley" , Geert Uytterhoeven , , Subject: [PATCH 2/2] drivers/scsi: make sun3x_esp.c driver explicitly non-modular Date: Sun, 27 Mar 2016 13:00:25 -0400 Message-ID: <1459098025-26269-3-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1459098025-26269-1-git-send-email-paul.gortmaker@windriver.com> References: <1459098025-26269-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Kconfig for this driver is currently: config SUN3X_ESP bool "Sun3x ESP SCSI" ...meaning that it currently is not being built as a module by anyone, and it has been this way since the beginning of git history (~2005). Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: "James E.J. Bottomley" Cc: Geert Uytterhoeven Cc: linux-scsi@vger.kernel.org Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Paul Gortmaker --- drivers/scsi/sun3x_esp.c | 44 +++++--------------------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c index d50c5ed8f428..55a02f4331e5 100644 --- a/drivers/scsi/sun3x_esp.c +++ b/drivers/scsi/sun3x_esp.c @@ -1,13 +1,14 @@ /* sun3x_esp.c: ESP front-end for Sun3x systems. * * Copyright (C) 2007,2008 Thomas Bogendoerfer (tsbogend@alpha.franken.de) + * + * License: GPL */ #include #include #include #include -#include #include #include #include @@ -268,33 +269,11 @@ fail: return err; } -static int esp_sun3x_remove(struct platform_device *dev) -{ - struct esp *esp = dev_get_drvdata(&dev->dev); - unsigned int irq = esp->host->irq; - u32 val; - - scsi_esp_unregister(esp); - - /* Disable interrupts. */ - val = dma_read32(DMA_CSR); - dma_write32(val & ~DMA_INT_ENAB, DMA_CSR); - - free_irq(irq, esp); - dma_free_coherent(esp->dev, 16, - esp->command_block, - esp->command_block_dma); - - scsi_host_put(esp->host); - - return 0; -} - static struct platform_driver esp_sun3x_driver = { .probe = esp_sun3x_probe, - .remove = esp_sun3x_remove, .driver = { - .name = "sun3x_esp", + .name = "sun3x_esp", + .suppress_bind_attrs = true, }, }; @@ -302,17 +281,4 @@ static int __init sun3x_esp_init(void) { return platform_driver_register(&esp_sun3x_driver); } - -static void __exit sun3x_esp_exit(void) -{ - platform_driver_unregister(&esp_sun3x_driver); -} - -MODULE_DESCRIPTION("Sun3x ESP SCSI driver"); -MODULE_AUTHOR("Thomas Bogendoerfer (tsbogend@alpha.franken.de)"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); - -module_init(sun3x_esp_init); -module_exit(sun3x_esp_exit); -MODULE_ALIAS("platform:sun3x_esp"); +device_initcall(sun3x_esp_init);