Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2671559ybi; Sat, 13 Jul 2019 20:58:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5TM+fRG2UtuJkiITSJzlSKUgR3d346Cr1lpsNbRkv/3cWnrAGTcbZMPcMHgeqpBQIloLD X-Received: by 2002:a17:902:1129:: with SMTP id d38mr21147969pla.220.1563076708847; Sat, 13 Jul 2019 20:58:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563076708; cv=none; d=google.com; s=arc-20160816; b=z8OnBi4M025F7Tey11YhJ3mQoq8b+FUKr4emaxIUHQ083eiG5Z/E+KSQer8hnZjWDX X6MymeE+JT7KonDju3axJXaOv493Y8F3VPsB+IVLVRawN9Z0pe5dXkrrf6H66XRAg+VW NFUkhQct/DlPJTXWHzcW3mUo5XgcdKkJEwYnCN7H98bKtDHvahcHLl9UHcgpMNETk9sV oxLqiVS3jkcjQnjbn1grLEg7hZT4KAI1CIw/5YlV+GmL0R85GAGLb2sl8s7i4P6guVXA ovZKsTtsfKwAjkAoeTNxk9OFrjEbecsEDERa0Y+7fuqXntIFtQZsjNl6hJ1JiWYGywPR DwvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=eVslYtP3RRYAvR0G4As7IC/zt4GeJXXhm5y1C16D/hQ=; b=EEQALJvvmYDu7dSU3BRM5bB8AyZbMHAYnIp8x8Df443PIlE73sF31tvaskXQ7OHZC5 Ids0MCd3Fv9lQp/qvBylu0YAPaVW0P73POqAiPCZZyEnbRJp08J+G3BpOaSqyXJJjAJT EzgDKeMwuD/y/+LJnsoeIr/Sqf9anyi3S22AgnzyV1ARBB0p+3aOINIDkVhc2la/yiMI r3aNVDUPELVIuE674A6Vint6tWHiOYoFl86UgGx/L3txmQBOMcVrg82OSXeA+EHt2Pe2 WtStja91hHydCZvEt7+QYwb7ITZdICwRPHdMLGJ+mRv7jpLKbNLEdF1AOPIMAdIsbDb2 1wSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j69si12706461pgd.589.2019.07.13.20.57.59; Sat, 13 Jul 2019 20:58:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728181AbfGND5c (ORCPT + 99 others); Sat, 13 Jul 2019 23:57:32 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:52422 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728009AbfGND5c (ORCPT ); Sat, 13 Jul 2019 23:57:32 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2A7F83AB7ACB01E0A67B; Sun, 14 Jul 2019 11:57:30 +0800 (CST) Received: from use12-sp2.huawei.com (10.67.189.174) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Sun, 14 Jul 2019 11:57:21 +0800 From: Xiaoming Ni To: , , , , , , CC: , , , , Subject: [PATCH] mtd: phram: Module parameters add writable permissions Date: Sun, 14 Jul 2019 11:57:18 +0800 Message-ID: <1563076638-101332-1-git-send-email-nixiaoming@huawei.com> X-Mailer: git-send-email 1.8.5.6 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.189.174] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The phram code implements managing multiple devices through a linked list. However, due to the module parameter permission of 0, the /sys/module/phram/parameters/phram interface is missing. The command line arguments in insmod can only create one device. Therefore, add writable permissions to the module parameters, create /sys/module/phram/parameters/phram interface, and create multi-device support. Signed-off-by: Xiaoming Ni --- drivers/mtd/devices/phram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index c467286..931e5c2 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c @@ -294,7 +294,7 @@ static int phram_param_call(const char *val, const struct kernel_param *kp) #endif } -module_param_call(phram, phram_param_call, NULL, NULL, 000); +module_param_call(phram, phram_param_call, NULL, NULL, 0200); MODULE_PARM_DESC(phram, "Memory region to map. \"phram=,,\""); -- 1.8.5.6