mtdchar.c (d264f72ae56245358025109d9d066d159589802d) mtdchar.c (855e5d8cfebc21f45c9446a88b61e29d94c03781)
1/*
2 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 916 unchanged lines hidden (view full) ---

925 ret = -EOPNOTSUPP;
926 switch (mfi->mode) {
927 case MTD_FILE_MODE_OTP_FACTORY:
928 if (mtd->get_fact_prot_info)
929 ret = mtd_get_fact_prot_info(mtd, buf, 4096);
930 break;
931 case MTD_FILE_MODE_OTP_USER:
932 if (mtd->get_user_prot_info)
1/*
2 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 916 unchanged lines hidden (view full) ---

925 ret = -EOPNOTSUPP;
926 switch (mfi->mode) {
927 case MTD_FILE_MODE_OTP_FACTORY:
928 if (mtd->get_fact_prot_info)
929 ret = mtd_get_fact_prot_info(mtd, buf, 4096);
930 break;
931 case MTD_FILE_MODE_OTP_USER:
932 if (mtd->get_user_prot_info)
933 ret = mtd->get_user_prot_info(mtd, buf, 4096);
933 ret = mtd_get_user_prot_info(mtd, buf, 4096);
934 break;
935 default:
936 break;
937 }
938 if (ret >= 0) {
939 if (cmd == OTPGETREGIONCOUNT) {
940 int nbr = ret / sizeof(struct otp_info);
941 ret = copy_to_user(argp, &nbr, sizeof(int));

--- 348 unchanged lines hidden ---
934 break;
935 default:
936 break;
937 }
938 if (ret >= 0) {
939 if (cmd == OTPGETREGIONCOUNT) {
940 int nbr = ret / sizeof(struct otp_info);
941 ret = copy_to_user(argp, &nbr, sizeof(int));

--- 348 unchanged lines hidden ---