]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mmc/gen_atmel_mci.c
mmc: Remove ops from struct mmc and put in mmc_ops
[people/ms/u-boot.git] / drivers / mmc / gen_atmel_mci.c
index 77ebf174f00c5a39a35f4f2b005c6750e6df30d8..456f8bfdd46aed10ea23770dd2884e444891b276 100644 (file)
@@ -6,23 +6,7 @@
  * Original Driver:
  * Copyright (C) 2004-2006 Atmel Corporation
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * 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
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -360,6 +344,12 @@ static int mci_init(struct mmc *mmc)
        return 0;
 }
 
+static const struct mmc_ops atmel_mci_ops = {
+       .send_cmd       = mci_send_cmd,
+       .set_ios        = mci_set_ios,
+       .init           = mci_init,
+};
+
 /*
  * This is the only exported function
  *
@@ -376,11 +366,7 @@ int atmel_mci_init(void *regs)
 
        strcpy(mmc->name, "mci");
        mmc->priv = regs;
-       mmc->send_cmd = mci_send_cmd;
-       mmc->set_ios = mci_set_ios;
-       mmc->init = mci_init;
-       mmc->getcd = NULL;
-       mmc->getwp = NULL;
+       mmc->ops = &atmel_mci_ops;
 
        /* need to be able to pass these in on a board by board basis */
        mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;