Merge tag 'v3.10.83' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / mmc / card / block.c
index c3c9dbd0aaace8a26b14297f5d04b57dc11a0792..556ba8bc8b7e0c27286e5794856d86697c9a0fd8 100644 (file)
@@ -611,7 +611,7 @@ static ssize_t force_ro_show(struct device *dev, struct device_attribute *attr,
        int ret;
        struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev));
 
-       ret = snprintf(buf, PAGE_SIZE, "%d",
+       ret = snprintf(buf, PAGE_SIZE, "%d\n",
                       get_disk_ro(dev_to_disk(dev)) ^
                       md->read_only);
        mmc_blk_put(md);
@@ -1283,6 +1283,18 @@ static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type)
        md->reset_done &= ~type;
 }
 
+int mmc_access_rpmb(struct mmc_queue *mq)
+{
+       struct mmc_blk_data *md = mq->data;
+       /*
+        * If this is a RPMB partition access, return ture
+        */
+       if (md && md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB)
+               return true;
+
+       return false;
+}
+
 static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
 {
        struct mmc_blk_data *md = mq->data;