Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits) Driver core: show drivers in /sys/module/ Documentation/driver-model/platform.txt update/rewrite Driver core: platform_driver_probe(), can save codespace driver core: Use klist_remove() in device_move() driver core: Introduce device_move(): move a device to a new parent. Driver core: make drivers/base/core.c:setup_parent() static driver core: Introduce device_find_child(). sysfs: sysfs_write_file() writes zero terminated data cpu topology: consider sysfs_create_group return value Driver core: Call platform_notify_remove later ACPI: Change ACPI to use dev_archdata instead of firmware_data Driver core: add dev_archdata to struct device Driver core: convert sound core to use struct device Driver core: change mem class_devices to be real devices Driver core: convert fb code to use struct device Driver core: convert firmware code to use struct device Driver core: convert mmc code to use struct device Driver core: convert ppdev code to use struct device Driver core: convert PPP code to use struct device Driver core: convert cpuid code to use struct device ...
This commit is contained in:
@@ -130,8 +130,8 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
|
||||
u64 limit = BLK_BOUNCE_HIGH;
|
||||
int ret;
|
||||
|
||||
if (host->dev->dma_mask && *host->dev->dma_mask)
|
||||
limit = *host->dev->dma_mask;
|
||||
if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask)
|
||||
limit = *mmc_dev(host)->dma_mask;
|
||||
|
||||
mq->card = card;
|
||||
mq->queue = blk_init_queue(mmc_request, lock);
|
||||
|
@@ -199,7 +199,7 @@ void mmc_init_card(struct mmc_card *card, struct mmc_host *host)
|
||||
memset(card, 0, sizeof(struct mmc_card));
|
||||
card->host = host;
|
||||
device_initialize(&card->dev);
|
||||
card->dev.parent = card->host->dev;
|
||||
card->dev.parent = mmc_dev(host);
|
||||
card->dev.bus = &mmc_bus_type;
|
||||
card->dev.release = mmc_release_card;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ void mmc_remove_card(struct mmc_card *card)
|
||||
}
|
||||
|
||||
|
||||
static void mmc_host_classdev_release(struct class_device *dev)
|
||||
static void mmc_host_classdev_release(struct device *dev)
|
||||
{
|
||||
struct mmc_host *host = cls_dev_to_mmc_host(dev);
|
||||
kfree(host);
|
||||
@@ -250,7 +250,7 @@ static void mmc_host_classdev_release(struct class_device *dev)
|
||||
|
||||
static struct class mmc_host_class = {
|
||||
.name = "mmc_host",
|
||||
.release = mmc_host_classdev_release,
|
||||
.dev_release = mmc_host_classdev_release,
|
||||
};
|
||||
|
||||
static DEFINE_IDR(mmc_host_idr);
|
||||
@@ -267,10 +267,10 @@ struct mmc_host *mmc_alloc_host_sysfs(int extra, struct device *dev)
|
||||
if (host) {
|
||||
memset(host, 0, sizeof(struct mmc_host) + extra);
|
||||
|
||||
host->dev = dev;
|
||||
host->class_dev.dev = host->dev;
|
||||
host->parent = dev;
|
||||
host->class_dev.parent = dev;
|
||||
host->class_dev.class = &mmc_host_class;
|
||||
class_device_initialize(&host->class_dev);
|
||||
device_initialize(&host->class_dev);
|
||||
}
|
||||
|
||||
return host;
|
||||
@@ -292,10 +292,10 @@ int mmc_add_host_sysfs(struct mmc_host *host)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
snprintf(host->class_dev.class_id, BUS_ID_SIZE,
|
||||
snprintf(host->class_dev.bus_id, BUS_ID_SIZE,
|
||||
"mmc%d", host->index);
|
||||
|
||||
return class_device_add(&host->class_dev);
|
||||
return device_add(&host->class_dev);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -303,7 +303,7 @@ int mmc_add_host_sysfs(struct mmc_host *host)
|
||||
*/
|
||||
void mmc_remove_host_sysfs(struct mmc_host *host)
|
||||
{
|
||||
class_device_del(&host->class_dev);
|
||||
device_del(&host->class_dev);
|
||||
|
||||
spin_lock(&mmc_host_lock);
|
||||
idr_remove(&mmc_host_idr, host->index);
|
||||
@@ -315,7 +315,7 @@ void mmc_remove_host_sysfs(struct mmc_host *host)
|
||||
*/
|
||||
void mmc_free_host_sysfs(struct mmc_host *host)
|
||||
{
|
||||
class_device_put(&host->class_dev);
|
||||
put_device(&host->class_dev);
|
||||
}
|
||||
|
||||
static struct workqueue_struct *workqueue;
|
||||
|
@@ -1488,7 +1488,7 @@ static void __devinit wbsd_request_dma(struct wbsd_host *host, int dma)
|
||||
/*
|
||||
* Translate the address to a physical address.
|
||||
*/
|
||||
host->dma_addr = dma_map_single(host->mmc->dev, host->dma_buffer,
|
||||
host->dma_addr = dma_map_single(mmc_dev(host->mmc), host->dma_buffer,
|
||||
WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
|
||||
|
||||
/*
|
||||
@@ -1512,7 +1512,7 @@ kfree:
|
||||
*/
|
||||
BUG_ON(1);
|
||||
|
||||
dma_unmap_single(host->mmc->dev, host->dma_addr,
|
||||
dma_unmap_single(mmc_dev(host->mmc), host->dma_addr,
|
||||
WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
|
||||
host->dma_addr = (dma_addr_t)NULL;
|
||||
|
||||
@@ -1530,7 +1530,7 @@ err:
|
||||
static void __devexit wbsd_release_dma(struct wbsd_host *host)
|
||||
{
|
||||
if (host->dma_addr) {
|
||||
dma_unmap_single(host->mmc->dev, host->dma_addr,
|
||||
dma_unmap_single(mmc_dev(host->mmc), host->dma_addr,
|
||||
WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
|
||||
}
|
||||
kfree(host->dma_buffer);
|
||||
|
Reference in New Issue
Block a user