Skip to content

Commit

Permalink
gpio: 74xx-mmio: Make use of device properties
Browse files Browse the repository at this point in the history
Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.

Add mod_devicetable.h include.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
  • Loading branch information
Andy Shevchenko authored and Bartosz Golaszewski committed Jul 19, 2022
1 parent 272ddba commit 10fcd2f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/gpio/gpio-74xx-mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
*/

#include <linux/err.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/gpio/driver.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>

#define MMIO_74XX_DIR_IN (0 << 8)
#define MMIO_74XX_DIR_OUT (1 << 8)
Expand Down Expand Up @@ -112,7 +113,7 @@ static int mmio_74xx_gpio_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;

priv->flags = (uintptr_t)of_device_get_match_data(&pdev->dev);
priv->flags = (uintptr_t)device_get_match_data(&pdev->dev);

dat = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dat))
Expand Down

0 comments on commit 10fcd2f

Please sign in to comment.