<br><br><div class="gmail_quote">2010/6/30 Thibaut Girka <span dir="ltr">&lt;<a href="mailto:thib@sitedethib.com" target="_blank">thib@sitedethib.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

On the FR, the µSD can&#39;t be removed without removing the battery first.<br>
So, we can safely assume that the µSD is not removable.<br></blockquote><div><br>Isn&#39;t it possible to remove the micro SD while powered by USB ?<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

This patch make the MMC subsystem know that the card isn&#39;t removable if the new<br>
&quot;nonremovable&quot; field in the platform data is true.<br>
<br>
This affects, amongst other things, the suspend/resume process, the default<br>
behaviour being to remove the card (after syncind any mounted FS) on suspend,<br>
and re-detect it on resume, to prevent errors when removing the card while<br>
the device is suspended.<br>
---<br>
 drivers/mmc/host/glamo-mci.c |    4 ++++<br>
 include/linux/mfd/glamo.h    |    2 ++<br>
 2 files changed, 6 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/drivers/mmc/host/glamo-mci.c b/drivers/mmc/host/glamo-mci.c<br>
index 923c1ce..f07ad09 100644<br>
--- a/drivers/mmc/host/glamo-mci.c<br>
+++ b/drivers/mmc/host/glamo-mci.c<br>
@@ -812,6 +812,10 @@ static int glamo_mci_probe(struct platform_device *pdev)<br>
        mmc-&gt;caps       = MMC_CAP_4_BIT_DATA |<br>
                            MMC_CAP_MMC_HIGHSPEED |<br>
                            MMC_CAP_SD_HIGHSPEED;<br>
+<br>
+       if (host-&gt;pdata-&gt;nonremovable)<br>
+               mmc-&gt;caps |= MMC_CAP_NONREMOVABLE;<br>
+<br>
        mmc-&gt;f_min      = host-&gt;clk_rate / 256;<br>
        mmc-&gt;f_max      = sd_max_clk;<br>
<br>
diff --git a/include/linux/mfd/glamo.h b/include/linux/mfd/glamo.h<br>
index 529d4f0..ae52f3d 100644<br>
--- a/include/linux/mfd/glamo.h<br>
+++ b/include/linux/mfd/glamo.h<br>
@@ -8,6 +8,8 @@ struct glamo_fb_platform_data;<br>
 struct glamo_mmc_platform_data {<br>
        int     (*glamo_mmc_use_slow)(void);<br>
<br>
+       unsigned nonremovable:1;<br>
+<br>
        struct glamo_core *core;<br>
 };<br>
<font color="#888888"><br>
--<br>
1.7.1<br>
<br>
<br>
</font></blockquote></div><br>--<br>David<br>