Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270279
b: refs/heads/master
c: 34f5050
h: refs/heads/master
i:
  270277: 549d898
  270275: bb68f5e
  270271: bdb7c70
v: v3
  • Loading branch information
Per Forlin authored and Chris Ball committed Oct 26, 2011
1 parent 6ef9a7b commit 4e87080
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cba00eaa95c1ace1fb511f534b233ae302ccb2e
refs/heads/master: 34f5050800d600551cca9bcfb463cc6699d82d04
29 changes: 11 additions & 18 deletions trunk/drivers/mmc/core/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
#include "core.h"
#include "mmc_ops.h"

#ifdef CONFIG_FAIL_MMC_REQUEST

static DECLARE_FAULT_ATTR(fail_default_attr);
static char *fail_request;
module_param(fail_request, charp, 0);

#endif /* CONFIG_FAIL_MMC_REQUEST */

/* The debugfs functions are optimized away when CONFIG_DEBUG_FS isn't set. */
static int mmc_ios_show(struct seq_file *s, void *data)
{
Expand Down Expand Up @@ -168,23 +176,6 @@ static int mmc_clock_opt_set(void *data, u64 val)
return 0;
}

#ifdef CONFIG_FAIL_MMC_REQUEST

static DECLARE_FAULT_ATTR(fail_mmc_request);

#ifdef KERNEL
/*
* Internal function. Pass the boot param fail_mmc_request to
* the setup fault injection attributes routine.
*/
static int __init setup_fail_mmc_request(char *str)
{
return setup_fault_attr(&fail_mmc_request, str);
}
__setup("fail_mmc_request=", setup_fail_mmc_request);
#endif /* KERNEL */
#endif /* CONFIG_FAIL_MMC_REQUEST */

DEFINE_SIMPLE_ATTRIBUTE(mmc_clock_fops, mmc_clock_opt_get, mmc_clock_opt_set,
"%llu\n");

Expand Down Expand Up @@ -216,7 +207,9 @@ void mmc_add_host_debugfs(struct mmc_host *host)
goto err_node;
#endif
#ifdef CONFIG_FAIL_MMC_REQUEST
host->fail_mmc_request = fail_mmc_request;
if (fail_request)
setup_fault_attr(&fail_default_attr, fail_request);
host->fail_mmc_request = fail_default_attr;
if (IS_ERR(fault_create_debugfs_attr("fail_mmc_request",
root,
&host->fail_mmc_request)))
Expand Down

0 comments on commit 4e87080

Please sign in to comment.