NFC: st21nfcb: Add of_st21nfcb_i2c_match to MODULE_DEVICE_TABLE
authorChristophe Ricard <christophe.ricard@gmail.com>
Wed, 12 Nov 2014 23:30:25 +0000 (00:30 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 1 Dec 2014 23:54:18 +0000 (00:54 +0100)
When CONFIG_OF is define add of_st21nfcb_i2c_match to
MODULE_DEVICE_TABLE

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/st21nfcb/i2c.c

index c5d2427a3db276064c9669722b2039e5ddf90e3f..73f7ddef57c4f99bcace2727a8a50af0f45d7f9a 100644 (file)
@@ -401,10 +401,13 @@ static int st21nfcb_nci_i2c_remove(struct i2c_client *client)
        return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id of_st21nfcb_i2c_match[] = {
        { .compatible = "st,st21nfcb_i2c", },
        {}
 };
+MODULE_DEVICE_TABLE(of, of_st21nfcb_i2c_match);
+#endif
 
 static struct i2c_driver st21nfcb_nci_i2c_driver = {
        .driver = {