Commit 5c30bd24 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Ulf Hansson

mmc: atmel-mci: Use temporary variable for struct device

Use temporary variable for struct device to make code neater.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240417165708.2965612-3-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent ba791618
...@@ -526,6 +526,7 @@ static void atmci_show_status_reg(struct seq_file *s, ...@@ -526,6 +526,7 @@ static void atmci_show_status_reg(struct seq_file *s,
static int atmci_regs_show(struct seq_file *s, void *v) static int atmci_regs_show(struct seq_file *s, void *v)
{ {
struct atmel_mci *host = s->private; struct atmel_mci *host = s->private;
struct device *dev = &host->pdev->dev;
u32 *buf; u32 *buf;
int ret = 0; int ret = 0;
...@@ -534,7 +535,7 @@ static int atmci_regs_show(struct seq_file *s, void *v) ...@@ -534,7 +535,7 @@ static int atmci_regs_show(struct seq_file *s, void *v)
if (!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
pm_runtime_get_sync(&host->pdev->dev); pm_runtime_get_sync(dev);
/* /*
* Grab a more or less consistent snapshot. Note that we're * Grab a more or less consistent snapshot. Note that we're
...@@ -545,8 +546,8 @@ static int atmci_regs_show(struct seq_file *s, void *v) ...@@ -545,8 +546,8 @@ static int atmci_regs_show(struct seq_file *s, void *v)
memcpy_fromio(buf, host->regs, ATMCI_REGS_SIZE); memcpy_fromio(buf, host->regs, ATMCI_REGS_SIZE);
spin_unlock_bh(&host->lock); spin_unlock_bh(&host->lock);
pm_runtime_mark_last_busy(&host->pdev->dev); pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(&host->pdev->dev); pm_runtime_put_autosuspend(dev);
seq_printf(s, "MR:\t0x%08x%s%s ", seq_printf(s, "MR:\t0x%08x%s%s ",
buf[ATMCI_MR / 4], buf[ATMCI_MR / 4],
...@@ -629,33 +630,31 @@ static const struct of_device_id atmci_dt_ids[] = { ...@@ -629,33 +630,31 @@ static const struct of_device_id atmci_dt_ids[] = {
MODULE_DEVICE_TABLE(of, atmci_dt_ids); MODULE_DEVICE_TABLE(of, atmci_dt_ids);
static struct mci_platform_data* static struct mci_platform_data *atmci_of_init(struct device *dev)
atmci_of_init(struct platform_device *pdev)
{ {
struct device_node *np = pdev->dev.of_node; struct device_node *np = dev->of_node;
struct device_node *cnp; struct device_node *cnp;
struct mci_platform_data *pdata; struct mci_platform_data *pdata;
u32 slot_id; u32 slot_id;
int err; int err;
if (!np) { if (!np) {
dev_err(&pdev->dev, "device node not found\n"); dev_err(dev, "device node not found\n");
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) if (!pdata)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
for_each_child_of_node(np, cnp) { for_each_child_of_node(np, cnp) {
if (of_property_read_u32(cnp, "reg", &slot_id)) { if (of_property_read_u32(cnp, "reg", &slot_id)) {
dev_warn(&pdev->dev, "reg property is missing for %pOF\n", dev_warn(dev, "reg property is missing for %pOF\n", cnp);
cnp);
continue; continue;
} }
if (slot_id >= ATMCI_MAX_NR_SLOTS) { if (slot_id >= ATMCI_MAX_NR_SLOTS) {
dev_warn(&pdev->dev, "can't have more than %d slots\n", dev_warn(dev, "can't have more than %d slots\n",
ATMCI_MAX_NR_SLOTS); ATMCI_MAX_NR_SLOTS);
of_node_put(cnp); of_node_put(cnp);
break; break;
...@@ -666,7 +665,7 @@ atmci_of_init(struct platform_device *pdev) ...@@ -666,7 +665,7 @@ atmci_of_init(struct platform_device *pdev)
pdata->slot[slot_id].bus_width = 1; pdata->slot[slot_id].bus_width = 1;
pdata->slot[slot_id].detect_pin = pdata->slot[slot_id].detect_pin =
devm_fwnode_gpiod_get(&pdev->dev, of_fwnode_handle(cnp), devm_fwnode_gpiod_get(dev, of_fwnode_handle(cnp),
"cd", GPIOD_IN, "cd-gpios"); "cd", GPIOD_IN, "cd-gpios");
err = PTR_ERR_OR_ZERO(pdata->slot[slot_id].detect_pin); err = PTR_ERR_OR_ZERO(pdata->slot[slot_id].detect_pin);
if (err) { if (err) {
...@@ -681,7 +680,7 @@ atmci_of_init(struct platform_device *pdev) ...@@ -681,7 +680,7 @@ atmci_of_init(struct platform_device *pdev)
of_property_read_bool(cnp, "non-removable"); of_property_read_bool(cnp, "non-removable");
pdata->slot[slot_id].wp_pin = pdata->slot[slot_id].wp_pin =
devm_fwnode_gpiod_get(&pdev->dev, of_fwnode_handle(cnp), devm_fwnode_gpiod_get(dev, of_fwnode_handle(cnp),
"wp", GPIOD_IN, "wp-gpios"); "wp", GPIOD_IN, "wp-gpios");
err = PTR_ERR_OR_ZERO(pdata->slot[slot_id].wp_pin); err = PTR_ERR_OR_ZERO(pdata->slot[slot_id].wp_pin);
if (err) { if (err) {
...@@ -726,11 +725,10 @@ static inline unsigned int atmci_convert_chksize(struct atmel_mci *host, ...@@ -726,11 +725,10 @@ static inline unsigned int atmci_convert_chksize(struct atmel_mci *host,
static void atmci_timeout_timer(struct timer_list *t) static void atmci_timeout_timer(struct timer_list *t)
{ {
struct atmel_mci *host; struct atmel_mci *host = from_timer(host, t, timer);
struct device *dev = &host->pdev->dev;
host = from_timer(host, t, timer); dev_dbg(dev, "software timeout\n");
dev_dbg(&host->pdev->dev, "software timeout\n");
if (host->mrq->cmd->data) { if (host->mrq->cmd->data) {
host->mrq->cmd->data->error = -ETIMEDOUT; host->mrq->cmd->data->error = -ETIMEDOUT;
...@@ -848,15 +846,14 @@ static u32 atmci_prepare_command(struct mmc_host *mmc, ...@@ -848,15 +846,14 @@ static u32 atmci_prepare_command(struct mmc_host *mmc,
static void atmci_send_command(struct atmel_mci *host, static void atmci_send_command(struct atmel_mci *host,
struct mmc_command *cmd, u32 cmd_flags) struct mmc_command *cmd, u32 cmd_flags)
{ {
struct device *dev = &host->pdev->dev;
unsigned int timeout_ms = cmd->busy_timeout ? cmd->busy_timeout : unsigned int timeout_ms = cmd->busy_timeout ? cmd->busy_timeout :
ATMCI_CMD_TIMEOUT_MS; ATMCI_CMD_TIMEOUT_MS;
WARN_ON(host->cmd); WARN_ON(host->cmd);
host->cmd = cmd; host->cmd = cmd;
dev_vdbg(&host->pdev->dev, dev_vdbg(dev, "start command: ARGR=0x%08x CMDR=0x%08x\n", cmd->arg, cmd_flags);
"start command: ARGR=0x%08x CMDR=0x%08x\n",
cmd->arg, cmd_flags);
atmci_writel(host, ATMCI_ARGR, cmd->arg); atmci_writel(host, ATMCI_ARGR, cmd->arg);
atmci_writel(host, ATMCI_CMDR, cmd_flags); atmci_writel(host, ATMCI_CMDR, cmd_flags);
...@@ -866,7 +863,9 @@ static void atmci_send_command(struct atmel_mci *host, ...@@ -866,7 +863,9 @@ static void atmci_send_command(struct atmel_mci *host,
static void atmci_send_stop_cmd(struct atmel_mci *host, struct mmc_data *data) static void atmci_send_stop_cmd(struct atmel_mci *host, struct mmc_data *data)
{ {
dev_dbg(&host->pdev->dev, "send stop command\n"); struct device *dev = &host->pdev->dev;
dev_dbg(dev, "send stop command\n");
atmci_send_command(host, data->stop, host->stop_cmdr); atmci_send_command(host, data->stop, host->stop_cmdr);
atmci_writel(host, ATMCI_IER, ATMCI_CMDRDY); atmci_writel(host, ATMCI_IER, ATMCI_CMDRDY);
} }
...@@ -938,12 +937,11 @@ static void atmci_pdc_set_both_buf(struct atmel_mci *host, int dir) ...@@ -938,12 +937,11 @@ static void atmci_pdc_set_both_buf(struct atmel_mci *host, int dir)
*/ */
static void atmci_pdc_cleanup(struct atmel_mci *host) static void atmci_pdc_cleanup(struct atmel_mci *host)
{ {
struct device *dev = &host->pdev->dev;
struct mmc_data *data = host->data; struct mmc_data *data = host->data;
if (data) if (data)
dma_unmap_sg(&host->pdev->dev, dma_unmap_sg(dev, data->sg, data->sg_len, mmc_get_dma_dir(data));
data->sg, data->sg_len,
mmc_get_dma_dir(data));
} }
/* /*
...@@ -953,6 +951,7 @@ static void atmci_pdc_cleanup(struct atmel_mci *host) ...@@ -953,6 +951,7 @@ static void atmci_pdc_cleanup(struct atmel_mci *host)
*/ */
static void atmci_pdc_complete(struct atmel_mci *host) static void atmci_pdc_complete(struct atmel_mci *host)
{ {
struct device *dev = &host->pdev->dev;
int transfer_size = host->data->blocks * host->data->blksz; int transfer_size = host->data->blocks * host->data->blksz;
int i; int i;
...@@ -969,7 +968,7 @@ static void atmci_pdc_complete(struct atmel_mci *host) ...@@ -969,7 +968,7 @@ static void atmci_pdc_complete(struct atmel_mci *host)
atmci_pdc_cleanup(host); atmci_pdc_cleanup(host);
dev_dbg(&host->pdev->dev, "(%s) set pending xfer complete\n", __func__); dev_dbg(dev, "(%s) set pending xfer complete\n", __func__);
atmci_set_pending(host, EVENT_XFER_COMPLETE); atmci_set_pending(host, EVENT_XFER_COMPLETE);
tasklet_schedule(&host->tasklet); tasklet_schedule(&host->tasklet);
} }
...@@ -990,9 +989,10 @@ static void atmci_dma_cleanup(struct atmel_mci *host) ...@@ -990,9 +989,10 @@ static void atmci_dma_cleanup(struct atmel_mci *host)
static void atmci_dma_complete(void *arg) static void atmci_dma_complete(void *arg)
{ {
struct atmel_mci *host = arg; struct atmel_mci *host = arg;
struct device *dev = &host->pdev->dev;
struct mmc_data *data = host->data; struct mmc_data *data = host->data;
dev_vdbg(&host->pdev->dev, "DMA complete\n"); dev_vdbg(dev, "DMA complete\n");
if (host->caps.has_dma_conf_reg) if (host->caps.has_dma_conf_reg)
/* Disable DMA hardware handshaking on MCI */ /* Disable DMA hardware handshaking on MCI */
...@@ -1005,8 +1005,7 @@ static void atmci_dma_complete(void *arg) ...@@ -1005,8 +1005,7 @@ static void atmci_dma_complete(void *arg)
* to send the stop command or waiting for NBUSY in this case. * to send the stop command or waiting for NBUSY in this case.
*/ */
if (data) { if (data) {
dev_dbg(&host->pdev->dev, dev_dbg(dev, "(%s) set pending xfer complete\n", __func__);
"(%s) set pending xfer complete\n", __func__);
atmci_set_pending(host, EVENT_XFER_COMPLETE); atmci_set_pending(host, EVENT_XFER_COMPLETE);
tasklet_schedule(&host->tasklet); tasklet_schedule(&host->tasklet);
...@@ -1080,6 +1079,7 @@ static u32 atmci_prepare_data(struct atmel_mci *host, struct mmc_data *data) ...@@ -1080,6 +1079,7 @@ static u32 atmci_prepare_data(struct atmel_mci *host, struct mmc_data *data)
static u32 static u32
atmci_prepare_data_pdc(struct atmel_mci *host, struct mmc_data *data) atmci_prepare_data_pdc(struct atmel_mci *host, struct mmc_data *data)
{ {
struct device *dev = &host->pdev->dev;
u32 iflags, tmp; u32 iflags, tmp;
int i; int i;
...@@ -1105,8 +1105,7 @@ atmci_prepare_data_pdc(struct atmel_mci *host, struct mmc_data *data) ...@@ -1105,8 +1105,7 @@ atmci_prepare_data_pdc(struct atmel_mci *host, struct mmc_data *data)
/* Configure PDC */ /* Configure PDC */
host->data_size = data->blocks * data->blksz; host->data_size = data->blocks * data->blksz;
dma_map_sg(&host->pdev->dev, data->sg, data->sg_len, dma_map_sg(dev, data->sg, data->sg_len, mmc_get_dma_dir(data));
mmc_get_dma_dir(data));
if ((!host->caps.has_rwproof) if ((!host->caps.has_rwproof)
&& (host->data->flags & MMC_DATA_WRITE)) { && (host->data->flags & MMC_DATA_WRITE)) {
...@@ -1232,8 +1231,9 @@ atmci_submit_data_dma(struct atmel_mci *host, struct mmc_data *data) ...@@ -1232,8 +1231,9 @@ atmci_submit_data_dma(struct atmel_mci *host, struct mmc_data *data)
static void atmci_stop_transfer(struct atmel_mci *host) static void atmci_stop_transfer(struct atmel_mci *host)
{ {
dev_dbg(&host->pdev->dev, struct device *dev = &host->pdev->dev;
"(%s) set pending xfer complete\n", __func__);
dev_dbg(dev, "(%s) set pending xfer complete\n", __func__);
atmci_set_pending(host, EVENT_XFER_COMPLETE); atmci_set_pending(host, EVENT_XFER_COMPLETE);
atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY); atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY);
} }
...@@ -1249,14 +1249,14 @@ static void atmci_stop_transfer_pdc(struct atmel_mci *host) ...@@ -1249,14 +1249,14 @@ static void atmci_stop_transfer_pdc(struct atmel_mci *host)
static void atmci_stop_transfer_dma(struct atmel_mci *host) static void atmci_stop_transfer_dma(struct atmel_mci *host)
{ {
struct dma_chan *chan = host->data_chan; struct dma_chan *chan = host->data_chan;
struct device *dev = &host->pdev->dev;
if (chan) { if (chan) {
dmaengine_terminate_all(chan); dmaengine_terminate_all(chan);
atmci_dma_cleanup(host); atmci_dma_cleanup(host);
} else { } else {
/* Data transfer was stopped by the interrupt handler */ /* Data transfer was stopped by the interrupt handler */
dev_dbg(&host->pdev->dev, dev_dbg(dev, "(%s) set pending xfer complete\n", __func__);
"(%s) set pending xfer complete\n", __func__);
atmci_set_pending(host, EVENT_XFER_COMPLETE); atmci_set_pending(host, EVENT_XFER_COMPLETE);
atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY); atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY);
} }
...@@ -1269,6 +1269,7 @@ static void atmci_stop_transfer_dma(struct atmel_mci *host) ...@@ -1269,6 +1269,7 @@ static void atmci_stop_transfer_dma(struct atmel_mci *host)
static void atmci_start_request(struct atmel_mci *host, static void atmci_start_request(struct atmel_mci *host,
struct atmel_mci_slot *slot) struct atmel_mci_slot *slot)
{ {
struct device *dev = &host->pdev->dev;
struct mmc_request *mrq; struct mmc_request *mrq;
struct mmc_command *cmd; struct mmc_command *cmd;
struct mmc_data *data; struct mmc_data *data;
...@@ -1284,7 +1285,7 @@ static void atmci_start_request(struct atmel_mci *host, ...@@ -1284,7 +1285,7 @@ static void atmci_start_request(struct atmel_mci *host,
host->cmd_status = 0; host->cmd_status = 0;
host->data_status = 0; host->data_status = 0;
dev_dbg(&host->pdev->dev, "start request: cmd %u\n", mrq->cmd->opcode); dev_dbg(dev, "start request: cmd %u\n", mrq->cmd->opcode);
if (host->need_reset || host->caps.need_reset_after_xfer) { if (host->need_reset || host->caps.need_reset_after_xfer) {
iflags = atmci_readl(host, ATMCI_IMR); iflags = atmci_readl(host, ATMCI_IMR);
...@@ -1363,6 +1364,8 @@ static void atmci_start_request(struct atmel_mci *host, ...@@ -1363,6 +1364,8 @@ static void atmci_start_request(struct atmel_mci *host,
static void atmci_queue_request(struct atmel_mci *host, static void atmci_queue_request(struct atmel_mci *host,
struct atmel_mci_slot *slot, struct mmc_request *mrq) struct atmel_mci_slot *slot, struct mmc_request *mrq)
{ {
struct device *dev = &host->pdev->dev;
dev_vdbg(&slot->mmc->class_dev, "queue request: state=%d\n", dev_vdbg(&slot->mmc->class_dev, "queue request: state=%d\n",
host->state); host->state);
...@@ -1372,7 +1375,7 @@ static void atmci_queue_request(struct atmel_mci *host, ...@@ -1372,7 +1375,7 @@ static void atmci_queue_request(struct atmel_mci *host,
host->state = STATE_SENDING_CMD; host->state = STATE_SENDING_CMD;
atmci_start_request(host, slot); atmci_start_request(host, slot);
} else { } else {
dev_dbg(&host->pdev->dev, "queue request\n"); dev_dbg(dev, "queue request\n");
list_add_tail(&slot->queue_node, &host->queue); list_add_tail(&slot->queue_node, &host->queue);
} }
spin_unlock_bh(&host->lock); spin_unlock_bh(&host->lock);
...@@ -1382,10 +1385,11 @@ static void atmci_request(struct mmc_host *mmc, struct mmc_request *mrq) ...@@ -1382,10 +1385,11 @@ static void atmci_request(struct mmc_host *mmc, struct mmc_request *mrq)
{ {
struct atmel_mci_slot *slot = mmc_priv(mmc); struct atmel_mci_slot *slot = mmc_priv(mmc);
struct atmel_mci *host = slot->host; struct atmel_mci *host = slot->host;
struct device *dev = &host->pdev->dev;
struct mmc_data *data; struct mmc_data *data;
WARN_ON(slot->mrq); WARN_ON(slot->mrq);
dev_dbg(&host->pdev->dev, "MRQ: cmd %u\n", mrq->cmd->opcode); dev_dbg(dev, "MRQ: cmd %u\n", mrq->cmd->opcode);
/* /*
* We may "know" the card is gone even though there's still an * We may "know" the card is gone even though there's still an
...@@ -1595,6 +1599,7 @@ static void atmci_request_end(struct atmel_mci *host, struct mmc_request *mrq) ...@@ -1595,6 +1599,7 @@ static void atmci_request_end(struct atmel_mci *host, struct mmc_request *mrq)
{ {
struct atmel_mci_slot *slot = NULL; struct atmel_mci_slot *slot = NULL;
struct mmc_host *prev_mmc = host->cur_slot->mmc; struct mmc_host *prev_mmc = host->cur_slot->mmc;
struct device *dev = &host->pdev->dev;
WARN_ON(host->cmd || host->data); WARN_ON(host->cmd || host->data);
...@@ -1617,12 +1622,11 @@ static void atmci_request_end(struct atmel_mci *host, struct mmc_request *mrq) ...@@ -1617,12 +1622,11 @@ static void atmci_request_end(struct atmel_mci *host, struct mmc_request *mrq)
slot = list_entry(host->queue.next, slot = list_entry(host->queue.next,
struct atmel_mci_slot, queue_node); struct atmel_mci_slot, queue_node);
list_del(&slot->queue_node); list_del(&slot->queue_node);
dev_vdbg(&host->pdev->dev, "list not empty: %s is next\n", dev_vdbg(dev, "list not empty: %s is next\n", mmc_hostname(slot->mmc));
mmc_hostname(slot->mmc));
host->state = STATE_SENDING_CMD; host->state = STATE_SENDING_CMD;
atmci_start_request(host, slot); atmci_start_request(host, slot);
} else { } else {
dev_vdbg(&host->pdev->dev, "list empty\n"); dev_vdbg(dev, "list empty\n");
host->state = STATE_IDLE; host->state = STATE_IDLE;
} }
...@@ -1756,6 +1760,7 @@ static void atmci_detect_change(struct timer_list *t) ...@@ -1756,6 +1760,7 @@ static void atmci_detect_change(struct timer_list *t)
static void atmci_tasklet_func(struct tasklet_struct *t) static void atmci_tasklet_func(struct tasklet_struct *t)
{ {
struct atmel_mci *host = from_tasklet(host, t, tasklet); struct atmel_mci *host = from_tasklet(host, t, tasklet);
struct device *dev = &host->pdev->dev;
struct mmc_request *mrq = host->mrq; struct mmc_request *mrq = host->mrq;
struct mmc_data *data = host->data; struct mmc_data *data = host->data;
enum atmel_mci_state state = host->state; enum atmel_mci_state state = host->state;
...@@ -1766,14 +1771,13 @@ static void atmci_tasklet_func(struct tasklet_struct *t) ...@@ -1766,14 +1771,13 @@ static void atmci_tasklet_func(struct tasklet_struct *t)
state = host->state; state = host->state;
dev_vdbg(&host->pdev->dev, dev_vdbg(dev, "tasklet: state %u pending/completed/mask %lx/%lx/%x\n",
"tasklet: state %u pending/completed/mask %lx/%lx/%x\n",
state, host->pending_events, host->completed_events, state, host->pending_events, host->completed_events,
atmci_readl(host, ATMCI_IMR)); atmci_readl(host, ATMCI_IMR));
do { do {
prev_state = state; prev_state = state;
dev_dbg(&host->pdev->dev, "FSM: state=%d\n", state); dev_dbg(dev, "FSM: state=%d\n", state);
switch (state) { switch (state) {
case STATE_IDLE: case STATE_IDLE:
...@@ -1786,18 +1790,17 @@ static void atmci_tasklet_func(struct tasklet_struct *t) ...@@ -1786,18 +1790,17 @@ static void atmci_tasklet_func(struct tasklet_struct *t)
* END_REQUEST by default, WAITING_NOTBUSY if it's a * END_REQUEST by default, WAITING_NOTBUSY if it's a
* command needing it or DATA_XFER if there is data. * command needing it or DATA_XFER if there is data.
*/ */
dev_dbg(&host->pdev->dev, "FSM: cmd ready?\n"); dev_dbg(dev, "FSM: cmd ready?\n");
if (!atmci_test_and_clear_pending(host, if (!atmci_test_and_clear_pending(host,
EVENT_CMD_RDY)) EVENT_CMD_RDY))
break; break;
dev_dbg(&host->pdev->dev, "set completed cmd ready\n"); dev_dbg(dev, "set completed cmd ready\n");
host->cmd = NULL; host->cmd = NULL;
atmci_set_completed(host, EVENT_CMD_RDY); atmci_set_completed(host, EVENT_CMD_RDY);
atmci_command_complete(host, mrq->cmd); atmci_command_complete(host, mrq->cmd);
if (mrq->data) { if (mrq->data) {
dev_dbg(&host->pdev->dev, dev_dbg(dev, "command with data transfer\n");
"command with data transfer");
/* /*
* If there is a command error don't start * If there is a command error don't start
* data transfer. * data transfer.
...@@ -1812,8 +1815,7 @@ static void atmci_tasklet_func(struct tasklet_struct *t) ...@@ -1812,8 +1815,7 @@ static void atmci_tasklet_func(struct tasklet_struct *t)
} else } else
state = STATE_DATA_XFER; state = STATE_DATA_XFER;
} else if ((!mrq->data) && (mrq->cmd->flags & MMC_RSP_BUSY)) { } else if ((!mrq->data) && (mrq->cmd->flags & MMC_RSP_BUSY)) {
dev_dbg(&host->pdev->dev, dev_dbg(dev, "command response need waiting notbusy\n");
"command response need waiting notbusy");
atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY); atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY);
state = STATE_WAITING_NOTBUSY; state = STATE_WAITING_NOTBUSY;
} else } else
...@@ -1824,7 +1826,7 @@ static void atmci_tasklet_func(struct tasklet_struct *t) ...@@ -1824,7 +1826,7 @@ static void atmci_tasklet_func(struct tasklet_struct *t)
case STATE_DATA_XFER: case STATE_DATA_XFER:
if (atmci_test_and_clear_pending(host, if (atmci_test_and_clear_pending(host,
EVENT_DATA_ERROR)) { EVENT_DATA_ERROR)) {
dev_dbg(&host->pdev->dev, "set completed data error\n"); dev_dbg(dev, "set completed data error\n");
atmci_set_completed(host, EVENT_DATA_ERROR); atmci_set_completed(host, EVENT_DATA_ERROR);
state = STATE_END_REQUEST; state = STATE_END_REQUEST;
break; break;
...@@ -1837,14 +1839,12 @@ static void atmci_tasklet_func(struct tasklet_struct *t) ...@@ -1837,14 +1839,12 @@ static void atmci_tasklet_func(struct tasklet_struct *t)
* to the next step which is WAITING_NOTBUSY in write * to the next step which is WAITING_NOTBUSY in write
* case and directly SENDING_STOP in read case. * case and directly SENDING_STOP in read case.
*/ */
dev_dbg(&host->pdev->dev, "FSM: xfer complete?\n"); dev_dbg(dev, "FSM: xfer complete?\n");
if (!atmci_test_and_clear_pending(host, if (!atmci_test_and_clear_pending(host,
EVENT_XFER_COMPLETE)) EVENT_XFER_COMPLETE))
break; break;
dev_dbg(&host->pdev->dev, dev_dbg(dev, "(%s) set completed xfer complete\n", __func__);
"(%s) set completed xfer complete\n",
__func__);
atmci_set_completed(host, EVENT_XFER_COMPLETE); atmci_set_completed(host, EVENT_XFER_COMPLETE);
if (host->caps.need_notbusy_for_read_ops || if (host->caps.need_notbusy_for_read_ops ||
...@@ -1869,12 +1869,12 @@ static void atmci_tasklet_func(struct tasklet_struct *t) ...@@ -1869,12 +1869,12 @@ static void atmci_tasklet_func(struct tasklet_struct *t)
* included) or a write operation. In the latest case, * included) or a write operation. In the latest case,
* we need to send a stop command. * we need to send a stop command.
*/ */
dev_dbg(&host->pdev->dev, "FSM: not busy?\n"); dev_dbg(dev, "FSM: not busy?\n");
if (!atmci_test_and_clear_pending(host, if (!atmci_test_and_clear_pending(host,
EVENT_NOTBUSY)) EVENT_NOTBUSY))
break; break;
dev_dbg(&host->pdev->dev, "set completed not busy\n"); dev_dbg(dev, "set completed not busy\n");
atmci_set_completed(host, EVENT_NOTBUSY); atmci_set_completed(host, EVENT_NOTBUSY);
if (host->data) { if (host->data) {
...@@ -1904,12 +1904,12 @@ static void atmci_tasklet_func(struct tasklet_struct *t) ...@@ -1904,12 +1904,12 @@ static void atmci_tasklet_func(struct tasklet_struct *t)
* in order to go to the end request state instead of * in order to go to the end request state instead of
* sending stop again. * sending stop again.
*/ */
dev_dbg(&host->pdev->dev, "FSM: cmd ready?\n"); dev_dbg(dev, "FSM: cmd ready?\n");
if (!atmci_test_and_clear_pending(host, if (!atmci_test_and_clear_pending(host,
EVENT_CMD_RDY)) EVENT_CMD_RDY))
break; break;
dev_dbg(&host->pdev->dev, "FSM: cmd ready\n"); dev_dbg(dev, "FSM: cmd ready\n");
host->cmd = NULL; host->cmd = NULL;
data->bytes_xfered = data->blocks * data->blksz; data->bytes_xfered = data->blocks * data->blksz;
data->error = 0; data->error = 0;
...@@ -2108,6 +2108,7 @@ static void atmci_sdio_interrupt(struct atmel_mci *host, u32 status) ...@@ -2108,6 +2108,7 @@ static void atmci_sdio_interrupt(struct atmel_mci *host, u32 status)
static irqreturn_t atmci_interrupt(int irq, void *dev_id) static irqreturn_t atmci_interrupt(int irq, void *dev_id)
{ {
struct atmel_mci *host = dev_id; struct atmel_mci *host = dev_id;
struct device *dev = &host->pdev->dev;
u32 status, mask, pending; u32 status, mask, pending;
unsigned int pass_count = 0; unsigned int pass_count = 0;
...@@ -2119,21 +2120,21 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id) ...@@ -2119,21 +2120,21 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id)
break; break;
if (pending & ATMCI_DATA_ERROR_FLAGS) { if (pending & ATMCI_DATA_ERROR_FLAGS) {
dev_dbg(&host->pdev->dev, "IRQ: data error\n"); dev_dbg(dev, "IRQ: data error\n");
atmci_writel(host, ATMCI_IDR, ATMCI_DATA_ERROR_FLAGS atmci_writel(host, ATMCI_IDR, ATMCI_DATA_ERROR_FLAGS
| ATMCI_RXRDY | ATMCI_TXRDY | ATMCI_RXRDY | ATMCI_TXRDY
| ATMCI_ENDRX | ATMCI_ENDTX | ATMCI_ENDRX | ATMCI_ENDTX
| ATMCI_RXBUFF | ATMCI_TXBUFE); | ATMCI_RXBUFF | ATMCI_TXBUFE);
host->data_status = status; host->data_status = status;
dev_dbg(&host->pdev->dev, "set pending data error\n"); dev_dbg(dev, "set pending data error\n");
smp_wmb(); smp_wmb();
atmci_set_pending(host, EVENT_DATA_ERROR); atmci_set_pending(host, EVENT_DATA_ERROR);
tasklet_schedule(&host->tasklet); tasklet_schedule(&host->tasklet);
} }
if (pending & ATMCI_TXBUFE) { if (pending & ATMCI_TXBUFE) {
dev_dbg(&host->pdev->dev, "IRQ: tx buffer empty\n"); dev_dbg(dev, "IRQ: tx buffer empty\n");
atmci_writel(host, ATMCI_IDR, ATMCI_TXBUFE); atmci_writel(host, ATMCI_IDR, ATMCI_TXBUFE);
atmci_writel(host, ATMCI_IDR, ATMCI_ENDTX); atmci_writel(host, ATMCI_IDR, ATMCI_ENDTX);
/* /*
...@@ -2149,7 +2150,7 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id) ...@@ -2149,7 +2150,7 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id)
atmci_pdc_complete(host); atmci_pdc_complete(host);
} }
} else if (pending & ATMCI_ENDTX) { } else if (pending & ATMCI_ENDTX) {
dev_dbg(&host->pdev->dev, "IRQ: end of tx buffer\n"); dev_dbg(dev, "IRQ: end of tx buffer\n");
atmci_writel(host, ATMCI_IDR, ATMCI_ENDTX); atmci_writel(host, ATMCI_IDR, ATMCI_ENDTX);
if (host->data_size) { if (host->data_size) {
...@@ -2160,7 +2161,7 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id) ...@@ -2160,7 +2161,7 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id)
} }
if (pending & ATMCI_RXBUFF) { if (pending & ATMCI_RXBUFF) {
dev_dbg(&host->pdev->dev, "IRQ: rx buffer full\n"); dev_dbg(dev, "IRQ: rx buffer full\n");
atmci_writel(host, ATMCI_IDR, ATMCI_RXBUFF); atmci_writel(host, ATMCI_IDR, ATMCI_RXBUFF);
atmci_writel(host, ATMCI_IDR, ATMCI_ENDRX); atmci_writel(host, ATMCI_IDR, ATMCI_ENDRX);
/* /*
...@@ -2176,7 +2177,7 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id) ...@@ -2176,7 +2177,7 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id)
atmci_pdc_complete(host); atmci_pdc_complete(host);
} }
} else if (pending & ATMCI_ENDRX) { } else if (pending & ATMCI_ENDRX) {
dev_dbg(&host->pdev->dev, "IRQ: end of rx buffer\n"); dev_dbg(dev, "IRQ: end of rx buffer\n");
atmci_writel(host, ATMCI_IDR, ATMCI_ENDRX); atmci_writel(host, ATMCI_IDR, ATMCI_ENDRX);
if (host->data_size) { if (host->data_size) {
...@@ -2193,19 +2194,19 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id) ...@@ -2193,19 +2194,19 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id)
* The appropriate workaround is to use the BLKE signal. * The appropriate workaround is to use the BLKE signal.
*/ */
if (pending & ATMCI_BLKE) { if (pending & ATMCI_BLKE) {
dev_dbg(&host->pdev->dev, "IRQ: blke\n"); dev_dbg(dev, "IRQ: blke\n");
atmci_writel(host, ATMCI_IDR, ATMCI_BLKE); atmci_writel(host, ATMCI_IDR, ATMCI_BLKE);
smp_wmb(); smp_wmb();
dev_dbg(&host->pdev->dev, "set pending notbusy\n"); dev_dbg(dev, "set pending notbusy\n");
atmci_set_pending(host, EVENT_NOTBUSY); atmci_set_pending(host, EVENT_NOTBUSY);
tasklet_schedule(&host->tasklet); tasklet_schedule(&host->tasklet);
} }
if (pending & ATMCI_NOTBUSY) { if (pending & ATMCI_NOTBUSY) {
dev_dbg(&host->pdev->dev, "IRQ: not_busy\n"); dev_dbg(dev, "IRQ: not_busy\n");
atmci_writel(host, ATMCI_IDR, ATMCI_NOTBUSY); atmci_writel(host, ATMCI_IDR, ATMCI_NOTBUSY);
smp_wmb(); smp_wmb();
dev_dbg(&host->pdev->dev, "set pending notbusy\n"); dev_dbg(dev, "set pending notbusy\n");
atmci_set_pending(host, EVENT_NOTBUSY); atmci_set_pending(host, EVENT_NOTBUSY);
tasklet_schedule(&host->tasklet); tasklet_schedule(&host->tasklet);
} }
...@@ -2216,11 +2217,11 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id) ...@@ -2216,11 +2217,11 @@ static irqreturn_t atmci_interrupt(int irq, void *dev_id)
atmci_write_data_pio(host); atmci_write_data_pio(host);
if (pending & ATMCI_CMDRDY) { if (pending & ATMCI_CMDRDY) {
dev_dbg(&host->pdev->dev, "IRQ: cmd ready\n"); dev_dbg(dev, "IRQ: cmd ready\n");
atmci_writel(host, ATMCI_IDR, ATMCI_CMDRDY); atmci_writel(host, ATMCI_IDR, ATMCI_CMDRDY);
host->cmd_status = status; host->cmd_status = status;
smp_wmb(); smp_wmb();
dev_dbg(&host->pdev->dev, "set pending cmd rdy\n"); dev_dbg(dev, "set pending cmd rdy\n");
atmci_set_pending(host, EVENT_CMD_RDY); atmci_set_pending(host, EVENT_CMD_RDY);
tasklet_schedule(&host->tasklet); tasklet_schedule(&host->tasklet);
} }
...@@ -2252,11 +2253,12 @@ static int atmci_init_slot(struct atmel_mci *host, ...@@ -2252,11 +2253,12 @@ static int atmci_init_slot(struct atmel_mci *host,
struct mci_slot_pdata *slot_data, unsigned int id, struct mci_slot_pdata *slot_data, unsigned int id,
u32 sdc_reg, u32 sdio_irq) u32 sdc_reg, u32 sdio_irq)
{ {
struct device *dev = &host->pdev->dev;
struct mmc_host *mmc; struct mmc_host *mmc;
struct atmel_mci_slot *slot; struct atmel_mci_slot *slot;
int ret; int ret;
mmc = mmc_alloc_host(sizeof(struct atmel_mci_slot), &host->pdev->dev); mmc = mmc_alloc_host(sizeof(struct atmel_mci_slot), dev);
if (!mmc) if (!mmc)
return -ENOMEM; return -ENOMEM;
...@@ -2375,12 +2377,13 @@ static void atmci_cleanup_slot(struct atmel_mci_slot *slot, ...@@ -2375,12 +2377,13 @@ static void atmci_cleanup_slot(struct atmel_mci_slot *slot,
static int atmci_configure_dma(struct atmel_mci *host) static int atmci_configure_dma(struct atmel_mci *host)
{ {
host->dma.chan = dma_request_chan(&host->pdev->dev, "rxtx"); struct device *dev = &host->pdev->dev;
host->dma.chan = dma_request_chan(dev, "rxtx");
if (IS_ERR(host->dma.chan)) if (IS_ERR(host->dma.chan))
return PTR_ERR(host->dma.chan); return PTR_ERR(host->dma.chan);
dev_info(&host->pdev->dev, "using %s for DMA transfers\n", dev_info(dev, "using %s for DMA transfers\n", dma_chan_name(host->dma.chan));
dma_chan_name(host->dma.chan));
host->dma_conf.src_addr = host->mapbase + ATMCI_RDR; host->dma_conf.src_addr = host->mapbase + ATMCI_RDR;
host->dma_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; host->dma_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
...@@ -2400,11 +2403,11 @@ static int atmci_configure_dma(struct atmel_mci *host) ...@@ -2400,11 +2403,11 @@ static int atmci_configure_dma(struct atmel_mci *host)
*/ */
static void atmci_get_cap(struct atmel_mci *host) static void atmci_get_cap(struct atmel_mci *host)
{ {
struct device *dev = &host->pdev->dev;
unsigned int version; unsigned int version;
version = atmci_get_version(host); version = atmci_get_version(host);
dev_info(&host->pdev->dev, dev_info(dev, "version: 0x%x\n", version);
"version: 0x%x\n", version);
host->caps.has_dma_conf_reg = false; host->caps.has_dma_conf_reg = false;
host->caps.has_pdc = true; host->caps.has_pdc = true;
...@@ -2445,14 +2448,14 @@ static void atmci_get_cap(struct atmel_mci *host) ...@@ -2445,14 +2448,14 @@ static void atmci_get_cap(struct atmel_mci *host)
break; break;
default: default:
host->caps.has_pdc = false; host->caps.has_pdc = false;
dev_warn(&host->pdev->dev, dev_warn(dev, "Unmanaged mci version, set minimum capabilities\n");
"Unmanaged mci version, set minimum capabilities\n");
break; break;
} }
} }
static int atmci_probe(struct platform_device *pdev) static int atmci_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev;
struct mci_platform_data *pdata; struct mci_platform_data *pdata;
struct atmel_mci *host; struct atmel_mci *host;
struct resource *regs; struct resource *regs;
...@@ -2464,9 +2467,9 @@ static int atmci_probe(struct platform_device *pdev) ...@@ -2464,9 +2467,9 @@ static int atmci_probe(struct platform_device *pdev)
if (!regs) if (!regs)
return -ENXIO; return -ENXIO;
pdata = atmci_of_init(pdev); pdata = atmci_of_init(dev);
if (IS_ERR(pdata)) { if (IS_ERR(pdata)) {
dev_err(&pdev->dev, "platform data not available\n"); dev_err(dev, "platform data not available\n");
return PTR_ERR(pdata); return PTR_ERR(pdata);
} }
...@@ -2474,7 +2477,7 @@ static int atmci_probe(struct platform_device *pdev) ...@@ -2474,7 +2477,7 @@ static int atmci_probe(struct platform_device *pdev)
if (irq < 0) if (irq < 0)
return irq; return irq;
host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL);
if (!host) if (!host)
return -ENOMEM; return -ENOMEM;
...@@ -2482,11 +2485,11 @@ static int atmci_probe(struct platform_device *pdev) ...@@ -2482,11 +2485,11 @@ static int atmci_probe(struct platform_device *pdev)
spin_lock_init(&host->lock); spin_lock_init(&host->lock);
INIT_LIST_HEAD(&host->queue); INIT_LIST_HEAD(&host->queue);
host->mck = devm_clk_get(&pdev->dev, "mci_clk"); host->mck = devm_clk_get(dev, "mci_clk");
if (IS_ERR(host->mck)) if (IS_ERR(host->mck))
return PTR_ERR(host->mck); return PTR_ERR(host->mck);
host->regs = devm_ioremap(&pdev->dev, regs->start, resource_size(regs)); host->regs = devm_ioremap(dev, regs->start, resource_size(regs));
if (!host->regs) if (!host->regs)
return -ENOMEM; return -ENOMEM;
...@@ -2501,7 +2504,7 @@ static int atmci_probe(struct platform_device *pdev) ...@@ -2501,7 +2504,7 @@ static int atmci_probe(struct platform_device *pdev)
tasklet_setup(&host->tasklet, atmci_tasklet_func); tasklet_setup(&host->tasklet, atmci_tasklet_func);
ret = request_irq(irq, atmci_interrupt, 0, dev_name(&pdev->dev), host); ret = request_irq(irq, atmci_interrupt, 0, dev_name(dev), host);
if (ret) { if (ret) {
clk_disable_unprepare(host->mck); clk_disable_unprepare(host->mck);
return ret; return ret;
...@@ -2517,12 +2520,12 @@ static int atmci_probe(struct platform_device *pdev) ...@@ -2517,12 +2520,12 @@ static int atmci_probe(struct platform_device *pdev)
host->submit_data = &atmci_submit_data_dma; host->submit_data = &atmci_submit_data_dma;
host->stop_transfer = &atmci_stop_transfer_dma; host->stop_transfer = &atmci_stop_transfer_dma;
} else if (host->caps.has_pdc) { } else if (host->caps.has_pdc) {
dev_info(&pdev->dev, "using PDC\n"); dev_info(dev, "using PDC\n");
host->prepare_data = &atmci_prepare_data_pdc; host->prepare_data = &atmci_prepare_data_pdc;
host->submit_data = &atmci_submit_data_pdc; host->submit_data = &atmci_submit_data_pdc;
host->stop_transfer = &atmci_stop_transfer_pdc; host->stop_transfer = &atmci_stop_transfer_pdc;
} else { } else {
dev_info(&pdev->dev, "using PIO\n"); dev_info(dev, "using PIO\n");
host->prepare_data = &atmci_prepare_data; host->prepare_data = &atmci_prepare_data;
host->submit_data = &atmci_submit_data; host->submit_data = &atmci_submit_data;
host->stop_transfer = &atmci_stop_transfer; host->stop_transfer = &atmci_stop_transfer;
...@@ -2532,11 +2535,11 @@ static int atmci_probe(struct platform_device *pdev) ...@@ -2532,11 +2535,11 @@ static int atmci_probe(struct platform_device *pdev)
timer_setup(&host->timer, atmci_timeout_timer, 0); timer_setup(&host->timer, atmci_timeout_timer, 0);
pm_runtime_get_noresume(&pdev->dev); pm_runtime_get_noresume(dev);
pm_runtime_set_active(&pdev->dev); pm_runtime_set_active(dev);
pm_runtime_set_autosuspend_delay(&pdev->dev, AUTOSUSPEND_DELAY); pm_runtime_set_autosuspend_delay(dev, AUTOSUSPEND_DELAY);
pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_use_autosuspend(dev);
pm_runtime_enable(&pdev->dev); pm_runtime_enable(dev);
/* We need at least one slot to succeed */ /* We need at least one slot to succeed */
nr_slots = 0; nr_slots = 0;
...@@ -2561,27 +2564,26 @@ static int atmci_probe(struct platform_device *pdev) ...@@ -2561,27 +2564,26 @@ static int atmci_probe(struct platform_device *pdev)
} }
if (!nr_slots) { if (!nr_slots) {
dev_err(&pdev->dev, "init failed: no slot defined\n"); dev_err(dev, "init failed: no slot defined\n");
goto err_init_slot; goto err_init_slot;
} }
if (!host->caps.has_rwproof) { if (!host->caps.has_rwproof) {
host->buffer = dma_alloc_coherent(&pdev->dev, host->buf_size, host->buffer = dma_alloc_coherent(dev, host->buf_size,
&host->buf_phys_addr, &host->buf_phys_addr,
GFP_KERNEL); GFP_KERNEL);
if (!host->buffer) { if (!host->buffer) {
ret = -ENOMEM; ret = -ENOMEM;
dev_err(&pdev->dev, "buffer allocation failed\n"); dev_err(dev, "buffer allocation failed\n");
goto err_dma_alloc; goto err_dma_alloc;
} }
} }
dev_info(&pdev->dev, dev_info(dev, "Atmel MCI controller at 0x%08lx irq %d, %u slots\n",
"Atmel MCI controller at 0x%08lx irq %d, %u slots\n", host->mapbase, irq, nr_slots);
host->mapbase, irq, nr_slots);
pm_runtime_mark_last_busy(&host->pdev->dev); pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(&pdev->dev); pm_runtime_put_autosuspend(dev);
return 0; return 0;
...@@ -2593,8 +2595,8 @@ static int atmci_probe(struct platform_device *pdev) ...@@ -2593,8 +2595,8 @@ static int atmci_probe(struct platform_device *pdev)
err_init_slot: err_init_slot:
clk_disable_unprepare(host->mck); clk_disable_unprepare(host->mck);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(dev);
pm_runtime_put_noidle(&pdev->dev); pm_runtime_put_noidle(dev);
del_timer_sync(&host->timer); del_timer_sync(&host->timer);
if (!IS_ERR(host->dma.chan)) if (!IS_ERR(host->dma.chan))
...@@ -2607,13 +2609,13 @@ static int atmci_probe(struct platform_device *pdev) ...@@ -2607,13 +2609,13 @@ static int atmci_probe(struct platform_device *pdev)
static void atmci_remove(struct platform_device *pdev) static void atmci_remove(struct platform_device *pdev)
{ {
struct atmel_mci *host = platform_get_drvdata(pdev); struct atmel_mci *host = platform_get_drvdata(pdev);
struct device *dev = &pdev->dev;
unsigned int i; unsigned int i;
pm_runtime_get_sync(&pdev->dev); pm_runtime_get_sync(dev);
if (host->buffer) if (host->buffer)
dma_free_coherent(&pdev->dev, host->buf_size, dma_free_coherent(dev, host->buf_size, host->buffer, host->buf_phys_addr);
host->buffer, host->buf_phys_addr);
for (i = 0; i < ATMCI_MAX_NR_SLOTS; i++) { for (i = 0; i < ATMCI_MAX_NR_SLOTS; i++) {
if (host->slot[i]) if (host->slot[i])
...@@ -2632,8 +2634,8 @@ static void atmci_remove(struct platform_device *pdev) ...@@ -2632,8 +2634,8 @@ static void atmci_remove(struct platform_device *pdev)
clk_disable_unprepare(host->mck); clk_disable_unprepare(host->mck);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(dev);
pm_runtime_put_noidle(&pdev->dev); pm_runtime_put_noidle(dev);
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment