From: Christophe Ricard Date: Wed, 23 Dec 2015 22:45:01 +0000 (+0100) Subject: nfc: st-nci: Remove unneeded CONFIG_OF switches X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1faa65b0cf29dd23a8641805003bd58c5b3ab16c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nfc: st-nci: Remove unneeded CONFIG_OF switches DT headers already define NOOP routines when CONFIG_OF is not defined. Signed-off-by: Christophe Ricard Signed-off-by: Samuel Ortiz --- diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c index 15e3ce2d274c..a4b49e054ea2 100644 --- a/drivers/nfc/st-nci/i2c.c +++ b/drivers/nfc/st-nci/i2c.c @@ -210,7 +210,6 @@ static struct nfc_phy_ops i2c_phy_ops = { .disable = st_nci_i2c_disable, }; -#ifdef CONFIG_OF static int st_nci_i2c_of_request_resources(struct i2c_client *client) { struct st_nci_i2c_phy *phy = i2c_get_clientdata(client); @@ -248,12 +247,6 @@ static int st_nci_i2c_of_request_resources(struct i2c_client *client) return 0; } -#else -static int st_nci_i2c_of_request_resources(struct i2c_client *client) -{ - return -ENODEV; -} -#endif static int st_nci_i2c_request_resources(struct i2c_client *client) { @@ -358,7 +351,6 @@ static int st_nci_i2c_remove(struct i2c_client *client) return 0; } -#ifdef CONFIG_OF static const struct of_device_id of_st_nci_i2c_match[] = { { .compatible = "st,st21nfcb-i2c", }, { .compatible = "st,st21nfcb_i2c", }, @@ -366,7 +358,6 @@ static const struct of_device_id of_st_nci_i2c_match[] = { {} }; MODULE_DEVICE_TABLE(of, of_st_nci_i2c_match); -#endif static struct i2c_driver st_nci_i2c_driver = { .driver = { diff --git a/drivers/nfc/st-nci/spi.c b/drivers/nfc/st-nci/spi.c index d6519bb9dba5..0ab40cb335ad 100644 --- a/drivers/nfc/st-nci/spi.c +++ b/drivers/nfc/st-nci/spi.c @@ -225,7 +225,6 @@ static struct nfc_phy_ops spi_phy_ops = { .disable = st_nci_spi_disable, }; -#ifdef CONFIG_OF static int st_nci_spi_of_request_resources(struct spi_device *dev) { struct st_nci_spi_phy *phy = spi_get_drvdata(dev); @@ -263,12 +262,6 @@ static int st_nci_spi_of_request_resources(struct spi_device *dev) return 0; } -#else -static int st_nci_spi_of_request_resources(struct spi_device *dev) -{ - return -ENODEV; -} -#endif static int st_nci_spi_request_resources(struct spi_device *dev) { @@ -374,13 +367,11 @@ static int st_nci_spi_remove(struct spi_device *dev) return 0; } -#ifdef CONFIG_OF static const struct of_device_id of_st_nci_spi_match[] = { { .compatible = "st,st21nfcb-spi", }, {} }; MODULE_DEVICE_TABLE(of, of_st_nci_spi_match); -#endif static struct spi_driver st_nci_spi_driver = { .driver = {