Commit 8119c9ee authored by Jonathan Lemon's avatar Jonathan Lemon Committed by Jakub Kicinski

ptp: ocp: 32-bit fixups for pci start address

Use 'resource_size_t' instead of 'unsigned long' when computing the
pci start address, for the benefit of 32-bit platforms.
Signed-off-by: default avatarJonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9029ac03
...@@ -1403,7 +1403,7 @@ static const struct devlink_ops ptp_ocp_devlink_ops = { ...@@ -1403,7 +1403,7 @@ static const struct devlink_ops ptp_ocp_devlink_ops = {
}; };
static void __iomem * static void __iomem *
__ptp_ocp_get_mem(struct ptp_ocp *bp, unsigned long start, int size) __ptp_ocp_get_mem(struct ptp_ocp *bp, resource_size_t start, int size)
{ {
struct resource res = DEFINE_RES_MEM_NAMED(start, size, "ptp_ocp"); struct resource res = DEFINE_RES_MEM_NAMED(start, size, "ptp_ocp");
...@@ -1413,7 +1413,7 @@ __ptp_ocp_get_mem(struct ptp_ocp *bp, unsigned long start, int size) ...@@ -1413,7 +1413,7 @@ __ptp_ocp_get_mem(struct ptp_ocp *bp, unsigned long start, int size)
static void __iomem * static void __iomem *
ptp_ocp_get_mem(struct ptp_ocp *bp, struct ocp_resource *r) ptp_ocp_get_mem(struct ptp_ocp *bp, struct ocp_resource *r)
{ {
unsigned long start; resource_size_t start;
start = pci_resource_start(bp->pdev, 0) + r->offset; start = pci_resource_start(bp->pdev, 0) + r->offset;
return __ptp_ocp_get_mem(bp, start, r->size); return __ptp_ocp_get_mem(bp, start, r->size);
...@@ -1427,7 +1427,7 @@ ptp_ocp_set_irq_resource(struct resource *res, int irq) ...@@ -1427,7 +1427,7 @@ ptp_ocp_set_irq_resource(struct resource *res, int irq)
} }
static void static void
ptp_ocp_set_mem_resource(struct resource *res, unsigned long start, int size) ptp_ocp_set_mem_resource(struct resource *res, resource_size_t start, int size)
{ {
struct resource r = DEFINE_RES_MEM(start, size); struct resource r = DEFINE_RES_MEM(start, size);
*res = r; *res = r;
...@@ -1440,7 +1440,7 @@ ptp_ocp_register_spi(struct ptp_ocp *bp, struct ocp_resource *r) ...@@ -1440,7 +1440,7 @@ ptp_ocp_register_spi(struct ptp_ocp *bp, struct ocp_resource *r)
struct pci_dev *pdev = bp->pdev; struct pci_dev *pdev = bp->pdev;
struct platform_device *p; struct platform_device *p;
struct resource res[2]; struct resource res[2];
unsigned long start; resource_size_t start;
int id; int id;
start = pci_resource_start(pdev, 0) + r->offset; start = pci_resource_start(pdev, 0) + r->offset;
...@@ -1467,7 +1467,7 @@ ptp_ocp_i2c_bus(struct pci_dev *pdev, struct ocp_resource *r, int id) ...@@ -1467,7 +1467,7 @@ ptp_ocp_i2c_bus(struct pci_dev *pdev, struct ocp_resource *r, int id)
{ {
struct ptp_ocp_i2c_info *info; struct ptp_ocp_i2c_info *info;
struct resource res[2]; struct resource res[2];
unsigned long start; resource_size_t start;
info = r->extra; info = r->extra;
start = pci_resource_start(pdev, 0) + r->offset; start = pci_resource_start(pdev, 0) + r->offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment