]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
spi: bcm2835aux: Fix build error without CONFIG_DEBUG_FS
authorYueHaibing <yuehaibing@huawei.com>
Sat, 6 Apr 2019 15:14:57 +0000 (23:14 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 8 Apr 2019 07:06:14 +0000 (14:06 +0700)
When building CONFIG_DEBUG_FS is not set
gcc warn this:

drivers/spi/spi-bcm2835aux.c: In function bcm2835aux_spi_probe:
drivers/spi/spi-bcm2835aux.c:591:2: error: too many arguments to function bcm2835aux_debugfs_create
  bcm2835aux_debugfs_create(bs, dev_name(&pdev->dev));
  ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-bcm2835aux.c:145:13: note: declared here
 static void bcm2835aux_debugfs_create(struct bcm2835aux_spi *bs)

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 8048d151eb4d ("spi: bcm2835aux: add driver stats to debugfs")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm2835aux.c

index fd8252dce4a2f2aa92c0a7adb5e32c79adf309fe..bbf87adb3ff8ad9d13d113f90c304f2417ed1367 100644 (file)
@@ -142,7 +142,8 @@ static void bcm2835aux_debugfs_remove(struct bcm2835aux_spi *bs)
        bs->debugfs_dir = NULL;
 }
 #else
-static void bcm2835aux_debugfs_create(struct bcm2835aux_spi *bs)
+static void bcm2835aux_debugfs_create(struct bcm2835aux_spi *bs,
+                                     const char *dname)
 {
 }