From patchwork Tue Jun 9 17:45:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 187697 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp777290ilo; Tue, 9 Jun 2020 11:12:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfeqRsGmQpdplBAEL7tXgpZSxG2IZFxHz7BcetWsy2Zxi7AZHwBfvK/8cywIPu4KxHpHO+ X-Received: by 2002:aa7:de08:: with SMTP id h8mr27237533edv.164.1591726341780; Tue, 09 Jun 2020 11:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591726341; cv=none; d=google.com; s=arc-20160816; b=HSVKaPEEx4QDbf4REkmopd2v/GlM1uVOLBVxOJVm8bdZpQyzq7aZ9Phbppk3H5EoiK lon6d4quLrvdurpDAdK2nlK/YC1CjxWpGeRR8LOa6YiGaJ/brNV3PWc1V9org8s/2XSI 30RDl/dpVO21fWRLhcDSZzVCCdDwmzRRoBEurFYriQWN62LqQotm/jrvMP/MLuJvaHtB hftUzHyjcb+WbOZFKWS/1L3Rqh1++9Aw3P4H/2SD7ZriowmlMYI5PM2zCsedMgR7Gorg Ghzf5SrikEEbt19pYQWcQkjvmA3vAhBWdARDjnT6Yxj9CfwqxaFn2kWZNj6M4PuCtxhX mzBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ztjvm0j/ZvEUJ+PQor15BliOH6k5fZnnE/NZiJaGgak=; b=iNtOY+cSO1kuhO6eicPr2sD43OWkruLyCiFsgThYT71MZXjwbu/A5bVhDKQbs+Mx1Z txiWMnGPYZjADSlX9tel0bVv6aij9du1SD676iIGhyLqnf4XWCWplUj5B9+VfNCOQWAO MR7ASABZyS1SwPjJqN9ozNXzuntpn6DU+MmAE7HYe6SrDJ5TtQb+H1nc8nBjuhn7ijSg DySSMqZ5HC+BpkaT8xZdhaB3OkQe0iE++2Sr5bZoVmT46dNfZapLyp2suTZaO0NIlw7D 8NWHrihZYREh+AjNebgVceIrW4usfz9TftwVW5WPRHwp5RewKnMCn5P9nLFV6288w8FA ULuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1dUjzoml; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si5695418edi.415.2020.06.09.11.12.21; Tue, 09 Jun 2020 11:12:21 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1dUjzoml; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387872AbgFISF4 (ORCPT + 15 others); Tue, 9 Jun 2020 14:05:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:40304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731340AbgFIRvZ (ORCPT ); Tue, 9 Jun 2020 13:51:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F0D912074B; Tue, 9 Jun 2020 17:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591725084; bh=XxPjzOynTHbPgpR13vBAI/9uNDts2jENToDc88xOW0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1dUjzomlEM4Z4NaPLVJ2AtpjxW42QRYXgNFjoyL1bDscwefqygAZE1Kg2N7/7yoDW x9NilWEYQ8VXE757daXYKIcGh0AOoukWILN+k7gzNpgYgFTqypkUMrquNeYRmSUX4c bkb59BHIrkzBU91M3OJGVCWOrf92voZiZAKgsRNk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Douglas Anderson Subject: [PATCH 4.19 18/25] nvmem: qfprom: remove incorrect write support Date: Tue, 9 Jun 2020 19:45:08 +0200 Message-Id: <20200609174050.711498673@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200609174048.576094775@linuxfoundation.org> References: <20200609174048.576094775@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla commit 8d9eb0d6d59a5d7028c80a30831143d3e75515a7 upstream. qfprom has different address spaces for read and write. Reads are always done from corrected address space, where as writes are done on raw address space. Writing to corrected address space is invalid and ignored, so it does not make sense to have this support in the driver which only supports corrected address space regions at the moment. Fixes: 4ab11996b489 ("nvmem: qfprom: Add Qualcomm QFPROM support.") Signed-off-by: Srinivas Kandagatla Reviewed-by: Douglas Anderson Cc: stable Link: https://lore.kernel.org/r/20200522113341.7728-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/nvmem/qfprom.c | 14 -------------- 1 file changed, 14 deletions(-) --- a/drivers/nvmem/qfprom.c +++ b/drivers/nvmem/qfprom.c @@ -35,25 +35,11 @@ static int qfprom_reg_read(void *context return 0; } -static int qfprom_reg_write(void *context, - unsigned int reg, void *_val, size_t bytes) -{ - struct qfprom_priv *priv = context; - u8 *val = _val; - int i = 0, words = bytes; - - while (words--) - writeb(*val++, priv->base + reg + i++); - - return 0; -} - static struct nvmem_config econfig = { .name = "qfprom", .stride = 1, .word_size = 1, .reg_read = qfprom_reg_read, - .reg_write = qfprom_reg_write, }; static int qfprom_probe(struct platform_device *pdev)