* [PATCH] ARM: OMAP: Check the get_cover_state function pointer if not set
@ 2007-11-29 8:01 Kyungmin Park
2007-12-01 0:06 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Kyungmin Park @ 2007-11-29 8:01 UTC (permalink / raw)
To: tony; +Cc: linux-omap-open-source
If the get_cover_state is not set, it occurs the oops.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index cf9d31c..d7ecece 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -238,7 +238,9 @@ static void mmc_omap_release_slot(struct mmc_omap_slot *slot)
static inline
int mmc_omap_cover_is_open(struct mmc_omap_slot *slot)
{
- return slot->pdata->get_cover_state(mmc_dev(slot->mmc), slot->id);
+ if (slot->pdata->get_cover_state)
+ return slot->pdata->get_cover_state(mmc_dev(slot->mmc), slot->id);
+ return 0;
}
static ssize_t
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ARM: OMAP: Check the get_cover_state function pointer if not set
2007-11-29 8:01 [PATCH] ARM: OMAP: Check the get_cover_state function pointer if not set Kyungmin Park
@ 2007-12-01 0:06 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2007-12-01 0:06 UTC (permalink / raw)
To: Kyungmin Park; +Cc: linux-omap-open-source
* Kyungmin Park <kyungmin.park@samsung.com> [071129 00:01]:
> If the get_cover_state is not set, it occurs the oops.
>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
> index cf9d31c..d7ecece 100644
> --- a/drivers/mmc/host/omap.c
> +++ b/drivers/mmc/host/omap.c
> @@ -238,7 +238,9 @@ static void mmc_omap_release_slot(struct mmc_omap_slot *slot)
> static inline
> int mmc_omap_cover_is_open(struct mmc_omap_slot *slot)
> {
> - return slot->pdata->get_cover_state(mmc_dev(slot->mmc), slot->id);
> + if (slot->pdata->get_cover_state)
> + return slot->pdata->get_cover_state(mmc_dev(slot->mmc), slot->id);
> + return 0;
> }
>
> static ssize_t
Pushing today.
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-01 0:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-29 8:01 [PATCH] ARM: OMAP: Check the get_cover_state function pointer if not set Kyungmin Park
2007-12-01 0:06 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox