Skip to content

Commit

Permalink
mtd: docg3: fix 'defined but not used' warning
Browse files Browse the repository at this point in the history
With CONFIG_OF=n, we can see the following warning:

   drivers/mtd/devices/docg3.c:2122:28: warning: 'docg3_dt_ids' defined but not used [-Wunused-variable]
    static struct of_device_id docg3_dt_ids[] = {

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
  • Loading branch information
Brian Norris committed Oct 22, 2014
1 parent a1ff7d6 commit d4efafc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mtd/devices/docg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2119,11 +2119,13 @@ static int __exit docg3_release(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_OF
static struct of_device_id docg3_dt_ids[] = {
{ .compatible = "m-systems,diskonchip-g3" },
{}
};
MODULE_DEVICE_TABLE(of, docg3_dt_ids);
#endif

static struct platform_driver g3_driver = {
.driver = {
Expand Down

0 comments on commit d4efafc

Please sign in to comment.