]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mmc/mmc_spi.c
mmc: Remove ops from struct mmc and put in mmc_ops
[people/ms/u-boot.git] / drivers / mmc / mmc_spi.c
index fe6a5a166de8bbebcea7b15e7a9bfe14c3caaa63..0a0f894bcb99ab53814e75c4f3f3fedb0ebd5265 100644 (file)
@@ -255,6 +255,12 @@ static int mmc_spi_init_p(struct mmc *mmc)
        return 0;
 }
 
+static const struct mmc_ops mmc_spi_ops = {
+       .send_cmd       = mmc_spi_request,
+       .set_ios        = mmc_spi_set_ios,
+       .init           = mmc_spi_init_p,
+};
+
 struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode)
 {
        struct mmc *mmc;
@@ -269,11 +275,7 @@ struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode)
                return NULL;
        }
        sprintf(mmc->name, "MMC_SPI");
-       mmc->send_cmd = mmc_spi_request;
-       mmc->set_ios = mmc_spi_set_ios;
-       mmc->init = mmc_spi_init_p;
-       mmc->getcd = NULL;
-       mmc->getwp = NULL;
+       mmc->ops = &mmc_spi_ops;
        mmc->host_caps = MMC_MODE_SPI;
 
        mmc->voltages = MMC_SPI_VOLTAGE;