Merge branch 'torvalds/master'
[firefly-linux-kernel-4.4.55.git] / drivers / nfc / pn544 / mei.c
index b5d3d18179eb1da92d35700a8f06fd91ad6a7666..46d0eb24eef9e07878443a38af17ab10e27ed341 100644 (file)
@@ -13,9 +13,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the
- * Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #include <linux/module.h>
@@ -29,7 +27,7 @@
 
 #define PN544_DRIVER_NAME "pn544"
 
-static int pn544_mei_probe(struct mei_cl_device *device,
+static int pn544_mei_probe(struct mei_cl_device *cldev,
                               const struct mei_cl_device_id *id)
 {
        struct nfc_mei_phy *phy;
@@ -37,7 +35,7 @@ static int pn544_mei_probe(struct mei_cl_device *device,
 
        pr_info("Probing NFC pn544\n");
 
-       phy = nfc_mei_phy_alloc(device);
+       phy = nfc_mei_phy_alloc(cldev);
        if (!phy) {
                pr_err("Cannot allocate memory for pn544 mei phy.\n");
                return -ENOMEM;
@@ -45,7 +43,7 @@ static int pn544_mei_probe(struct mei_cl_device *device,
 
        r = pn544_hci_probe(phy, &mei_phy_ops, LLC_NOP_NAME,
                            MEI_NFC_HEADER_SIZE, 0, MEI_NFC_MAX_HCI_PAYLOAD,
-                           &phy->hdev);
+                           NULL, &phy->hdev);
        if (r < 0) {
                nfc_mei_phy_free(phy);
 
@@ -55,9 +53,9 @@ static int pn544_mei_probe(struct mei_cl_device *device,
        return 0;
 }
 
-static int pn544_mei_remove(struct mei_cl_device *device)
+static int pn544_mei_remove(struct mei_cl_device *cldev)
 {
-       struct nfc_mei_phy *phy = mei_cl_get_drvdata(device);
+       struct nfc_mei_phy *phy = mei_cldev_get_drvdata(cldev);
 
        pr_info("Removing pn544\n");
 
@@ -69,7 +67,7 @@ static int pn544_mei_remove(struct mei_cl_device *device)
 }
 
 static struct mei_cl_device_id pn544_mei_tbl[] = {
-       { PN544_DRIVER_NAME },
+       { PN544_DRIVER_NAME, MEI_NFC_UUID, MEI_CL_VERSION_ANY},
 
        /* required last entry */
        { }
@@ -90,7 +88,7 @@ static int pn544_mei_init(void)
 
        pr_debug(DRIVER_DESC ": %s\n", __func__);
 
-       r = mei_cl_driver_register(&pn544_driver);
+       r = mei_cldev_driver_register(&pn544_driver);
        if (r) {
                pr_err(PN544_DRIVER_NAME ": driver registration failed\n");
                return r;
@@ -101,7 +99,7 @@ static int pn544_mei_init(void)
 
 static void pn544_mei_exit(void)
 {
-       mei_cl_driver_unregister(&pn544_driver);
+       mei_cldev_driver_unregister(&pn544_driver);
 }
 
 module_init(pn544_mei_init);