[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOCOHw5JsXQsPCS31RBTwRHvLg5a2n=3uq=+RFEv-vBNPdjcaQ@mail.gmail.com>
Date: Thu, 19 Oct 2017 22:00:35 -0700
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mark Brown <broonie@...nel.org>, alsa-devel@...a-project.org,
Sagar Dharia <sdharia@...eaurora.org>, bp@...e.de,
poeschel@...onage.de, Thierry Reding <treding@...dia.com>,
gong.chen@...ux.intel.com,
Andreas Noever <andreas.noever@...il.com>,
alan@...ux.intel.com, Mathieu Poirier <mathieu.poirier@...aro.org>,
Daniel Vetter <daniel@...ll.ch>, Jiri Kosina <jkosina@...e.cz>,
sharon.dvir1@...l.huji.ac.il, joe@...ches.com,
David Miller <davem@...emloft.net>, james.hogan@...tec.com,
Michael Opdenacker <michael.opdenacker@...e-electrons.com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
devicetree <devicetree@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>, kheitke@...ience.com,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [Patch v6 6/7] regmap: add SLIMBUS support
On Fri 06 Oct 08:51 PDT 2017, srinivas.kandagatla@...aro.org wrote:
> diff --git a/drivers/base/regmap/regmap-slimbus.c b/drivers/base/regmap/regmap-slimbus.c
[..]
> +static int regmap_slimbus_byte_reg_read(void *context, unsigned int reg,
> + unsigned int *val)
> +{
> + struct slim_device *slim = context;
> + struct slim_val_inf msg = {0,};
> +
> + msg.start_offset = reg;
> + msg.num_bytes = 1;
> + msg.rbuf = (void *)val;
Turn rbuf into a void * and you don't need this cast (think I commented
on this on a previous patch as well).
> +
> + return slim_request_val_element(slim, &msg);
> +}
> +
> +static int regmap_slimbus_byte_reg_write(void *context, unsigned int reg,
> + unsigned int val)
> +{
> + struct slim_device *slim = context;
> + struct slim_val_inf msg = {0,};
> +
> + msg.start_offset = reg;
> + msg.num_bytes = 1;
> + msg.wbuf = (void *)&val;
Dito
> +
> + return slim_change_val_element(slim, &msg);
> +}
Regards,
Bjorn
Powered by blists - more mailing lists