Skip to content

Commit

Permalink
nfc: st-nci: Remove unneeded CONFIG_OF switches
Browse files Browse the repository at this point in the history
DT headers already define NOOP routines when CONFIG_OF is not
defined.

Signed-off-by: Christophe Ricard <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
cricard13 authored and Samuel Ortiz committed Dec 29, 2015
1 parent 53eb525 commit 1faa65b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
9 changes: 0 additions & 9 deletions drivers/nfc/st-nci/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -358,15 +351,13 @@ 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", },
{ .compatible = "st,st21nfcc-i2c", },
{}
};
MODULE_DEVICE_TABLE(of, of_st_nci_i2c_match);
#endif

static struct i2c_driver st_nci_i2c_driver = {
.driver = {
Expand Down
9 changes: 0 additions & 9 deletions drivers/nfc/st-nci/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 1faa65b

Please sign in to comment.