ltq_mtd           111 drivers/mtd/maps/lantiq-flash.c 	struct ltq_mtd *ltq_mtd;
ltq_mtd           115 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd = devm_kzalloc(&pdev->dev, sizeof(struct ltq_mtd), GFP_KERNEL);
ltq_mtd           116 drivers/mtd/maps/lantiq-flash.c 	if (!ltq_mtd)
ltq_mtd           119 drivers/mtd/maps/lantiq-flash.c 	platform_set_drvdata(pdev, ltq_mtd);
ltq_mtd           121 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ltq_mtd           122 drivers/mtd/maps/lantiq-flash.c 	if (!ltq_mtd->res) {
ltq_mtd           127 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map = devm_kzalloc(&pdev->dev, sizeof(struct map_info),
ltq_mtd           129 drivers/mtd/maps/lantiq-flash.c 	if (!ltq_mtd->map)
ltq_mtd           132 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->phys = ltq_mtd->res->start;
ltq_mtd           133 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->size = resource_size(ltq_mtd->res);
ltq_mtd           134 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res);
ltq_mtd           135 drivers/mtd/maps/lantiq-flash.c 	if (IS_ERR(ltq_mtd->map->virt))
ltq_mtd           136 drivers/mtd/maps/lantiq-flash.c 		return PTR_ERR(ltq_mtd->map->virt);
ltq_mtd           138 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->name = ltq_map_name;
ltq_mtd           139 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->bankwidth = 2;
ltq_mtd           140 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->read = ltq_read16;
ltq_mtd           141 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->write = ltq_write16;
ltq_mtd           142 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->copy_from = ltq_copy_from;
ltq_mtd           143 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->copy_to = ltq_copy_to;
ltq_mtd           145 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->map_priv_1 = LTQ_NOR_PROBING;
ltq_mtd           146 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->mtd = do_map_probe("cfi_probe", ltq_mtd->map);
ltq_mtd           147 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->map->map_priv_1 = LTQ_NOR_NORMAL;
ltq_mtd           149 drivers/mtd/maps/lantiq-flash.c 	if (!ltq_mtd->mtd) {
ltq_mtd           154 drivers/mtd/maps/lantiq-flash.c 	ltq_mtd->mtd->dev.parent = &pdev->dev;
ltq_mtd           155 drivers/mtd/maps/lantiq-flash.c 	mtd_set_of_node(ltq_mtd->mtd, pdev->dev.of_node);
ltq_mtd           157 drivers/mtd/maps/lantiq-flash.c 	cfi = ltq_mtd->map->fldrv_priv;
ltq_mtd           161 drivers/mtd/maps/lantiq-flash.c 	err = mtd_device_register(ltq_mtd->mtd, NULL, 0);
ltq_mtd           170 drivers/mtd/maps/lantiq-flash.c 	map_destroy(ltq_mtd->mtd);
ltq_mtd           177 drivers/mtd/maps/lantiq-flash.c 	struct ltq_mtd *ltq_mtd = platform_get_drvdata(pdev);
ltq_mtd           179 drivers/mtd/maps/lantiq-flash.c 	if (ltq_mtd && ltq_mtd->mtd) {
ltq_mtd           180 drivers/mtd/maps/lantiq-flash.c 		mtd_device_unregister(ltq_mtd->mtd);
ltq_mtd           181 drivers/mtd/maps/lantiq-flash.c 		map_destroy(ltq_mtd->mtd);