All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Gromm <christian.gromm@microchip.com>
To: gregkh@linuxfoundation.org
Cc: driverdev-devel@linuxdriverproject.org,
	Christian Gromm <christian.gromm@microchip.com>,
	Alex Riesen <alexander.riesen@cetitec.com>
Subject: [PATCH 13/13] staging: most: usb: Fix setting of writable DCI registers
Date: Fri, 31 Mar 2017 15:22:34 +0200	[thread overview]
Message-ID: <20170331132234.21722-13-christian.gromm@microchip.com> (raw)
In-Reply-To: <20170331132234.21722-1-christian.gromm@microchip.com>

The function store_value is about writing a value, but the code has been
passing ro_regs array to get_static_reg_addr, which prevented setting
the writable registers.

Noticed when trying to setup the EUI48.

Signed-off-by: Alex Riesen <alexander.riesen@cetitec.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/hdm-usb/hdm_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index ad907e9c59bb..477c0ed305d3 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -1005,7 +1005,7 @@ static ssize_t store_value(struct most_dci_obj *dci_obj,
 		err = drci_wr_reg(usb_dev, dci_obj->reg_addr, val);
 	else if (!strcmp(name, "sync_ep"))
 		err = start_sync_ep(usb_dev, val);
-	else if (!get_static_reg_addr(ro_regs, name, &reg_addr))
+	else if (!get_static_reg_addr(rw_regs, name, &reg_addr))
 		err = drci_wr_reg(usb_dev, reg_addr, val);
 	else
 		return -EFAULT;
-- 
2.11.0

      parent reply	other threads:[~2017-03-31 13:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 13:22 [PATCH 01/13] staging: most: fix comment of the function add_link_store Christian Gromm
2017-03-31 13:22 ` [PATCH 02/13] staging: most: fix comment of the function remove_link_store Christian Gromm
2017-03-31 13:22 ` [PATCH 03/13] staging: most: use __ATTR_RO for the attribute interface Christian Gromm
2017-03-31 13:22 ` [PATCH 04/13] staging: most: use __ATTR_RO for the attribute value Christian Gromm
2017-03-31 13:22 ` [PATCH 05/13] staging: most: use __ATTR_RW in create_channel_attribute Christian Gromm
2017-04-01 21:18   ` kbuild test robot
2017-04-08 10:39   ` Greg KH
2017-03-31 13:22 ` [PATCH 06/13] staging: most: use __ATTR_RO in create_show_channel_attribute Christian Gromm
2017-03-31 13:22 ` [PATCH 07/13] staging: most: consolidate channel attributes Christian Gromm
2017-03-31 13:22 ` [PATCH 08/13] staging: most: separate property showing links Christian Gromm
2017-03-31 13:22 ` [PATCH 09/13] staging: most: consolidate attributes for list of links Christian Gromm
2017-03-31 13:22 ` [PATCH 10/13] staging: most: destroy cdev by channel disconnect Christian Gromm
2017-03-31 13:22 ` [PATCH 11/13] staging: most: usb: fix calculation of the extra_len Christian Gromm
2017-03-31 13:22 ` [PATCH 12/13] staging: most: usb: fix size overflow Christian Gromm
2017-03-31 13:22 ` Christian Gromm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170331132234.21722-13-christian.gromm@microchip.com \
    --to=christian.gromm@microchip.com \
    --cc=alexander.riesen@cetitec.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.