Skip to content

Commit 0777971

Browse files
Sachin Kamatgregkh
authored andcommitted
drivers: uio_dmem_genirq: Use of_match_ptr() macro
This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 585d98e commit 0777971

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/uio/uio_dmem_genirq.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ static const struct of_device_id uio_of_genirq_match[] = {
336336
{ /* empty for now */ },
337337
};
338338
MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
339-
#else
340-
# define uio_of_genirq_match NULL
341339
#endif
342340

343341
static struct platform_driver uio_dmem_genirq = {
@@ -347,7 +345,7 @@ static struct platform_driver uio_dmem_genirq = {
347345
.name = DRIVER_NAME,
348346
.owner = THIS_MODULE,
349347
.pm = &uio_dmem_genirq_dev_pm_ops,
350-
.of_match_table = uio_of_genirq_match,
348+
.of_match_table = of_match_ptr(uio_of_genirq_match),
351349
},
352350
};
353351

0 commit comments

Comments
 (0)