Skip to content

Commit 6154248

Browse files
committed
iio: jesd204: axi_jesd204_rx: use devm_platform_ioremap_resource()
Simplify the code with devm_platform_ioremap_resource(). Signed-off-by: Nuno Sa <nuno.sa@analog.com>
1 parent a281c05 commit 6154248

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

drivers/iio/jesd204/axi_jesd204_rx.c

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,6 @@ static int axi_jesd204_rx_probe(struct platform_device *pdev)
11581158
{
11591159
struct axi_jesd204_rx *jesd;
11601160
struct jesd204_dev *jdev;
1161-
struct resource *res;
11621161
int irq;
11631162
int ret;
11641163
u32 tmp;
@@ -1183,8 +1182,7 @@ static int axi_jesd204_rx_probe(struct platform_device *pdev)
11831182
jesd->dev = &pdev->dev;
11841183
jesd->jdev = jdev;
11851184

1186-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1187-
jesd->base = devm_ioremap_resource(&pdev->dev, res);
1185+
jesd->base = devm_platform_ioremap_resource(pdev, 0);
11881186
if (IS_ERR(jesd->base))
11891187
return PTR_ERR(jesd->base);
11901188

@@ -1306,16 +1304,11 @@ static int axi_jesd204_rx_probe(struct platform_device *pdev)
13061304
if (ret)
13071305
goto err_remove_debugfs;
13081306

1309-
dev_info(&pdev->dev, "AXI-JESD204-RX (%d.%.2d.%c) at 0x%08llX. Encoder %s, width %u/%u, lanes %d%s.",
1310-
ADI_AXI_PCORE_VER_MAJOR(jesd->version),
1311-
ADI_AXI_PCORE_VER_MINOR(jesd->version),
1312-
ADI_AXI_PCORE_VER_PATCH(jesd->version),
1313-
(unsigned long long)res->start,
1314-
jesd204_encoder_str(jesd->encoder),
1315-
jesd->data_path_width,
1316-
jesd->tpl_data_path_width,
1317-
jesd->num_lanes,
1318-
jdev ? ", jesd204-fsm" : "");
1307+
dev_info(&pdev->dev, "AXI-JESD204-RX (%d.%.2d.%c). Encoder %s, width %u/%u, lanes %d%s.",
1308+
ADI_AXI_PCORE_VER_MAJOR(jesd->version), ADI_AXI_PCORE_VER_MINOR(jesd->version),
1309+
ADI_AXI_PCORE_VER_PATCH(jesd->version), jesd204_encoder_str(jesd->encoder),
1310+
jesd->data_path_width, jesd->tpl_data_path_width, jesd->num_lanes,
1311+
jdev ? ", jesd204-fsm" : "");
13191312

13201313
return 0;
13211314

0 commit comments

Comments
 (0)