Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp739072imm; Thu, 13 Sep 2018 07:04:39 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda2IlahYpxcnU1mM+k1ICJA7sk1HN5SWoqhYkg87Nl3+7U6QsZALHuq36bCvycv5EdXcHp5 X-Received: by 2002:a63:1947:: with SMTP id 7-v6mr7445666pgz.192.1536847479505; Thu, 13 Sep 2018 07:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847479; cv=none; d=google.com; s=arc-20160816; b=bRnLg2x3XFCCNNrFMB0XhS4o3q+TyabXg+LnLFKoPCczQXsiJ4hqZHpXqQWbNAjdJ8 6LFuEdVtduGsz6+CX2VT+2bMsUaOh+hJzg74HngnHJ5e/BwXON+20j5twQLDryDTBn8E mmo1W1gRBK+xG387zrAz3u6uhb4DIT5KZHjtmWzX3OsZWAhfKkiw6jD2Iu0T9PC0dbfi vrGRBaSQu8Xk3d+Fb/l/eW6PDzRYjOESoYCJ8VLEkLUJ4nBSYOMtDtVV8FcbE0brc78e 7wYFtzUR2N4iDc06QlPRrA2Ym3okDm2S46xpHc9UzYXeV6bPn42Opfpj6TlIq2cEuqNF /DPw== 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; bh=YZuV0IVfXedk67NpJQlstOUTdjkG1ONaARMMr+V/PI8=; b=at5E4wAFC54/nbHHr5TJqEmYsniXyZcQyN9mrq2WgKpc28Z/6EzV51kjy8zPqypfO8 4FSzsE1DJOdtDGw0avY+bwsIMbBY+zTxtNmW0dHVxkfN90j+0nZt+6xd9OfKzkg2qNZ3 3lQzwgZKLAQSS1Kix4zfOMb72OF5kR016EtWljsqK8k3iokFI2H6ZdbNNlLYC07LQyj1 SSDgvvdQ6GbwrWgNp6mRZOYTF5cixxKjKidfbfCVFrI02WXCC40cPsVq8XVa6AmnJCNw bhfGK6g24j/knpc0fvCs3dLGwNUKapIUZ5/OMIB0WXd3tSkscGOej1Nt66li6e1X36LW zOPw== 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 q8-v6si3972739pgk.600.2018.09.13.07.04.21; Thu, 13 Sep 2018 07:04:39 -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 S1731924AbeIMTLj (ORCPT + 99 others); Thu, 13 Sep 2018 15:11:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35134 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731505AbeIMTLj (ORCPT ); Thu, 13 Sep 2018 15:11:39 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id AA0C9D29; Thu, 13 Sep 2018 14:02:00 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ian Abbott , Sasha Levin Subject: [PATCH 4.18 113/197] staging: comedi: ni_mio_common: fix subdevice flags for PFI subdevice Date: Thu, 13 Sep 2018 15:31:02 +0200 Message-Id: <20180913131846.067655560@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ian Abbott [ Upstream commit e083926b3e269d4064825dcf2ad50c636fddf8cf ] The PFI subdevice flags indicate that the subdevice is readable and writeable, but that is only true for the supported "M-series" boards, not the older "E-series" boards. Only set the SDF_READABLE and SDF_WRITABLE subdevice flags for the M-series boards. These two flags are mainly for informational purposes. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -5446,11 +5446,11 @@ static int ni_E_init(struct comedi_devic /* Digital I/O (PFI) subdevice */ s = &dev->subdevices[NI_PFI_DIO_SUBDEV]; s->type = COMEDI_SUBD_DIO; - s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL; s->maxdata = 1; if (devpriv->is_m_series) { s->n_chan = 16; s->insn_bits = ni_pfi_insn_bits; + s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL; ni_writew(dev, s->state, NI_M_PFI_DO_REG); for (i = 0; i < NUM_PFI_OUTPUT_SELECT_REGS; ++i) { @@ -5459,6 +5459,7 @@ static int ni_E_init(struct comedi_devic } } else { s->n_chan = 10; + s->subdev_flags = SDF_INTERNAL; } s->insn_config = ni_pfi_insn_config;