Commit 850c11cf authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] compile fixes

DaveM spotted bogus cast sprintf in checks.c.  Fixed.  Several places
that unregistered device called put_device() instead.
parent 2988ef57
......@@ -39,7 +39,7 @@ int platform_device_register(struct platform_device * pdev)
void platform_device_unregister(struct platform_device * pdev)
{
if (pdev)
put_device(&pdev->dev);
device_unregister(&pdev->dev);
}
static int platform_match(struct device * dev, struct device_driver * drv)
......
......@@ -125,7 +125,7 @@ int sys_device_register(struct sys_device * sysdev)
void sys_device_unregister(struct sys_device * sysdev)
{
if (sysdev)
put_device(&sysdev->dev);
device_unregister(&sysdev->dev);
}
struct bus_type system_bus_type = {
......
......@@ -289,13 +289,13 @@ static ssize_t part_start_read(struct device *dev,
char *page, size_t count, loff_t off)
{
struct hd_struct *p = dev->driver_data;
return off ? 0 : sprintf(page, "%llu\n",(u64)p->start_sect);
return off ? 0 : sprintf(page, "%llu\n",(unsigned long long)p->start_sect);
}
static ssize_t part_size_read(struct device *dev,
char *page, size_t count, loff_t off)
{
struct hd_struct *p = dev->driver_data;
return off ? 0 : sprintf(page, "%llu\n",(u64)p->nr_sects);
return off ? 0 : sprintf(page, "%llu\n",(unsigned long long)p->nr_sects);
}
static struct device_attribute part_attr_dev = {
.attr = {.name = "dev", .mode = S_IRUGO },
......@@ -375,7 +375,7 @@ static ssize_t disk_size_read(struct device *dev,
char *page, size_t count, loff_t off)
{
struct gendisk *disk = dev->driver_data;
return off ? 0 : sprintf(page, "%llu\n",(u64)get_capacity(disk));
return off ? 0 : sprintf(page, "%llu\n",(unsigned long long)get_capacity(disk));
}
static struct device_attribute disk_attr_dev = {
.attr = {.name = "dev", .mode = S_IRUGO },
......
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