Move mtd_bdi_*mappable to mtdcore.c

Removes one .h and one .c file that are never used outside of
mtdcore.c.

Signed-off-by: Joern Engel <joern@logfs.org>

Edited to remove on leftover debug define.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

authored by Jörn Engel and committed by Jens Axboe a33eb6b9 e6d086d8

+33 -62
+1 -1
drivers/mtd/Makefile
··· 4 4 5 5 # Core functionality. 6 6 obj-$(CONFIG_MTD) += mtd.o 7 - mtd-y := mtdcore.o mtdsuper.o mtdbdi.o 7 + mtd-y := mtdcore.o mtdsuper.o 8 8 mtd-$(CONFIG_MTD_PARTITIONS) += mtdpart.o 9 9 10 10 obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
-17
drivers/mtd/internal.h
··· 1 - /* Internal MTD definitions 2 - * 3 - * Copyright © 2006 Red Hat, Inc. All Rights Reserved. 4 - * Written by David Howells (dhowells@redhat.com) 5 - * 6 - * This program is free software; you can redistribute it and/or 7 - * modify it under the terms of the GNU General Public License 8 - * as published by the Free Software Foundation; either version 9 - * 2 of the License, or (at your option) any later version. 10 - */ 11 - 12 - /* 13 - * mtdbdi.c 14 - */ 15 - extern struct backing_dev_info mtd_bdi_unmappable; 16 - extern struct backing_dev_info mtd_bdi_ro_mappable; 17 - extern struct backing_dev_info mtd_bdi_rw_mappable;
-43
drivers/mtd/mtdbdi.c
··· 1 - /* MTD backing device capabilities 2 - * 3 - * Copyright © 2006 Red Hat, Inc. All Rights Reserved. 4 - * Written by David Howells (dhowells@redhat.com) 5 - * 6 - * This program is free software; you can redistribute it and/or 7 - * modify it under the terms of the GNU General Public License 8 - * as published by the Free Software Foundation; either version 9 - * 2 of the License, or (at your option) any later version. 10 - */ 11 - 12 - #include <linux/backing-dev.h> 13 - #include <linux/mtd/mtd.h> 14 - #include "internal.h" 15 - 16 - /* 17 - * backing device capabilities for non-mappable devices (such as NAND flash) 18 - * - permits private mappings, copies are taken of the data 19 - */ 20 - struct backing_dev_info mtd_bdi_unmappable = { 21 - .capabilities = BDI_CAP_MAP_COPY, 22 - }; 23 - 24 - /* 25 - * backing device capabilities for R/O mappable devices (such as ROM) 26 - * - permits private mappings, copies are taken of the data 27 - * - permits non-writable shared mappings 28 - */ 29 - struct backing_dev_info mtd_bdi_ro_mappable = { 30 - .capabilities = (BDI_CAP_MAP_COPY | BDI_CAP_MAP_DIRECT | 31 - BDI_CAP_EXEC_MAP | BDI_CAP_READ_MAP), 32 - }; 33 - 34 - /* 35 - * backing device capabilities for writable mappable devices (such as RAM) 36 - * - permits private mappings, copies are taken of the data 37 - * - permits non-writable shared mappings 38 - */ 39 - struct backing_dev_info mtd_bdi_rw_mappable = { 40 - .capabilities = (BDI_CAP_MAP_COPY | BDI_CAP_MAP_DIRECT | 41 - BDI_CAP_EXEC_MAP | BDI_CAP_READ_MAP | 42 - BDI_CAP_WRITE_MAP), 43 - };
+32 -1
drivers/mtd/mtdcore.c
··· 2 2 * Core registration and callback routines for MTD 3 3 * drivers and users. 4 4 * 5 + * bdi bits are: 6 + * Copyright © 2006 Red Hat, Inc. All Rights Reserved. 7 + * Written by David Howells (dhowells@redhat.com) 5 8 */ 6 9 7 10 #include <linux/module.h> ··· 19 16 #include <linux/init.h> 20 17 #include <linux/mtd/compatmac.h> 21 18 #include <linux/proc_fs.h> 19 + #include <linux/backing-dev.h> 22 20 23 21 #include <linux/mtd/mtd.h> 24 - #include "internal.h" 25 22 26 23 #include "mtdcore.h" 24 + /* 25 + * backing device capabilities for non-mappable devices (such as NAND flash) 26 + * - permits private mappings, copies are taken of the data 27 + */ 28 + struct backing_dev_info mtd_bdi_unmappable = { 29 + .capabilities = BDI_CAP_MAP_COPY, 30 + }; 31 + 32 + /* 33 + * backing device capabilities for R/O mappable devices (such as ROM) 34 + * - permits private mappings, copies are taken of the data 35 + * - permits non-writable shared mappings 36 + */ 37 + struct backing_dev_info mtd_bdi_ro_mappable = { 38 + .capabilities = (BDI_CAP_MAP_COPY | BDI_CAP_MAP_DIRECT | 39 + BDI_CAP_EXEC_MAP | BDI_CAP_READ_MAP), 40 + }; 41 + 42 + /* 43 + * backing device capabilities for writable mappable devices (such as RAM) 44 + * - permits private mappings, copies are taken of the data 45 + * - permits non-writable shared mappings 46 + */ 47 + struct backing_dev_info mtd_bdi_rw_mappable = { 48 + .capabilities = (BDI_CAP_MAP_COPY | BDI_CAP_MAP_DIRECT | 49 + BDI_CAP_EXEC_MAP | BDI_CAP_READ_MAP | 50 + BDI_CAP_WRITE_MAP), 51 + }; 27 52 28 53 static int mtd_cls_suspend(struct device *dev, pm_message_t state); 29 54 static int mtd_cls_resume(struct device *dev);