From: Jarkko Nikula <jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>,
Haojian Zhuang
<haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>,
Jarkko Nikula
<jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Mika Westerberg
<mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Andy Shevchenko
<andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Subject: [PATCH 3/7] spi: pxa2xx: Convert unique ID string of ACPI device as unsigned integer
Date: Thu, 22 Oct 2015 16:44:41 +0300 [thread overview]
Message-ID: <1445521485-2029-3-git-send-email-jarkko.nikula@linux.intel.com> (raw)
In-Reply-To: <1445521485-2029-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Andy noticed numeric unique device ID is unsigned integer so convert it
using kstrtouint(). Actually integer in ACPI 2.0 and later is 64 bits
litte-endian unsigned integer but quite certainly having so big value here
would mean something extra than just the SPI bus number so it won't hurt to
assume only lower 32 bits carry the bus number for now.
Signed-off-by: Jarkko Nikula <jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: Mika Westerberg <mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
drivers/spi/spi-pxa2xx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index e02ea46168eb..48fdcb6a7f79 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1309,7 +1309,8 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
struct resource *res;
const struct acpi_device_id *adev_id = NULL;
const struct pci_device_id *pcidev_id = NULL;
- int devid, type;
+ unsigned int devid;
+ int type;
adev = ACPI_COMPANION(&pdev->dev);
if (!adev)
@@ -1356,7 +1357,7 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
ssp->pdev = pdev;
ssp->port_id = -1;
- if (adev->pnp.unique_id && !kstrtoint(adev->pnp.unique_id, 0, &devid))
+ if (adev->pnp.unique_id && !kstrtouint(adev->pnp.unique_id, 0, &devid))
ssp->port_id = devid;
pdata->num_chipselect = 1;
--
2.6.1
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-10-22 13:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 13:44 [PATCH 1/7] spi: pxa2xx: move debug messages to pump_transfer() Jarkko Nikula
[not found] ` <1445521485-2029-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-10-22 13:44 ` [PATCH 2/7] spi: pxa2xx: derive struct chip_data from struct drv_data Jarkko Nikula
[not found] ` <1445521485-2029-2-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-10-22 23:57 ` Applied "spi: pxa2xx: derive struct chip_data from struct drv_data" to the spi tree Mark Brown
2015-10-25 11:42 ` [PATCH 2/7] spi: pxa2xx: derive struct chip_data from struct drv_data Robert Jarzmik
2015-10-22 13:44 ` Jarkko Nikula [this message]
[not found] ` <1445521485-2029-3-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-10-22 23:57 ` Applied "spi: pxa2xx: Convert unique ID string of ACPI device as unsigned integer" to the spi tree Mark Brown
2015-10-22 13:44 ` [PATCH 4/7] spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select Jarkko Nikula
[not found] ` <1445521485-2029-4-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-10-22 23:57 ` Applied "spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select" to the spi tree Mark Brown
2015-10-25 11:49 ` [PATCH 4/7] spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select Robert Jarzmik
2015-10-22 13:44 ` [PATCH 5/7] spi: pxa2xx: Align a few defines Jarkko Nikula
[not found] ` <1445521485-2029-5-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-10-22 23:57 ` Applied "spi: pxa2xx: Align a few defines" to the spi tree Mark Brown
2015-10-25 11:50 ` [PATCH 5/7] spi: pxa2xx: Align a few defines Robert Jarzmik
2015-10-22 13:44 ` [PATCH 6/7] spi: pxa2xx: Add support for multiple LPSS chip select signals Jarkko Nikula
[not found] ` <1445521485-2029-6-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-10-25 12:02 ` Robert Jarzmik
[not found] ` <87bnbnkvg9.fsf-4ty26DBLk+jEm7gnYqmdkQ@public.gmane.org>
2015-10-26 9:35 ` Jarkko Nikula
2015-10-22 13:44 ` [PATCH 7/7] spi: pxa2xx: Add support for Intel Broxton Jarkko Nikula
[not found] ` <1445521485-2029-7-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-10-30 2:20 ` Mark Brown
2015-10-22 23:57 ` Applied "spi: pxa2xx: move debug messages to pump_transfer()" to the spi tree Mark Brown
2015-10-25 11:39 ` [PATCH 1/7] spi: pxa2xx: move debug messages to pump_transfer() Robert Jarzmik
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=1445521485-2029-3-git-send-email-jarkko.nikula@linux.intel.com \
--to=jarkko.nikula-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org \
--cc=haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=robert.jarzmik-GANU6spQydw@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).