Skip to content

Commit

Permalink
of: fix a build error to of_graph_get_endpoint_by_regs function
Browse files Browse the repository at this point in the history
This patch fixes the below build error reported by Stephen,

     Stephen reported:
     After merging the drm-exynos tree, today's linux-next build (x86_64
     allmodconfig) failed like this:

     drivers/media/i2c/adv7604.o: In function `of_graph_get_endpoint_by_regs':
     adv7604.c:(.text+0x586c): multiple definition of `of_graph_get_endpoint_by_regs'
     drivers/media/i2c/adv7343.o:adv7343.c:(.text+0xa13): first defined here
     drivers/media/platform/soc_camera/atmel-isi.o: In function `of_graph_get_endpoint_by_regs':
     atmel-isi.c:(.text+0x1ec9): multiple definition of `of_graph_get_endpoint_by_regs'
     drivers/media/platform/soc_camera/soc_camera.o:soc_camera.c:(.text+0x2ce3): first defined here
     drivers/media/platform/soc_camera/rcar_vin.o: In function `of_graph_get_endpoint_by_regs':
     rcar_vin.c:(.text+0x307c): multiple definition of `of_graph_get_endpoint_by_regs'
     drivers/media/platform/soc_camera/soc_camera.o:soc_camera.c:(.text+0x2ce3): first defined here

     Caused by commit:
       a0f7001c18ca ("of: add helper for getting endpoint node of specific identifiers")

To fix the error, this patch declares of_graph_get_endpoint_by_regs function
with "static inline".

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Inki Dae authored and Dave Airlie committed Jun 24, 2015
1 parent 9eb1e57 commit ce0bdb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/of_graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static inline struct device_node *of_graph_get_next_endpoint(
return NULL;
}

struct device_node *of_graph_get_endpoint_by_regs(
static inline struct device_node *of_graph_get_endpoint_by_regs(
const struct device_node *parent, int port_reg, int reg)
{
return NULL;
Expand Down

0 comments on commit ce0bdb8

Please sign in to comment.