Commit 396382dc authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] tty_io warning fix

Don't assume the size of dev_t: on ppc64 it is unsignedlong and this
generates a printk warning.
parent 4a6e2172
......@@ -2126,7 +2126,7 @@ static spinlock_t tty_dev_list_lock = SPIN_LOCK_UNLOCKED;
static ssize_t show_dev(struct class_device *class_dev, char *buf)
{
struct tty_dev *tty_dev = to_tty_dev(class_dev);
return sprintf(buf, "%04x\n", tty_dev->dev);
return sprintf(buf, "%04lx\n", (unsigned long)tty_dev->dev);
}
static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
......
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