Skip to content

Commit

Permalink
of: constify drv arg of of_driver_match_device stub
Browse files Browse the repository at this point in the history
With this change the stub has the same signature as the actual function,
preventing this compiler warning when building without CONFIG_OF:

   drivers/base/property.c: In function 'fwnode_driver_match_device':
>> drivers/base/property.c:608:38: warning: passing argument 2 of 'of_driver_match_device' discards 'const' qualifier from pointer target type
      return of_driver_match_device(dev, drv);
                                         ^
   In file included from drivers/base/property.c:18:0:
   include/linux/of_device.h:61:19: note: expected 'struct device_driver *' but argument is of type 'const struct device_driver *'
    static inline int of_driver_match_device(struct device *dev,
                      ^

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
  • Loading branch information
Tomeu Vizoso authored and Rob Herring committed Jul 27, 2015
1 parent 39da809 commit 35068ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/of_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void of_dma_configure(struct device *dev, struct device_node *np);
#else /* CONFIG_OF */

static inline int of_driver_match_device(struct device *dev,
struct device_driver *drv)
const struct device_driver *drv)
{
return 0;
}
Expand Down

0 comments on commit 35068ce

Please sign in to comment.