Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mismatched iowrite* target size and some other compile errors #83

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions misc-modules/silly.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ ssize_t silly_write(struct file *filp, const char __user *buf, size_t count,
switch(mode) {
case M_32:
while (count >= 4) {
iowrite8(*(u32 *)ptr, add);
iowrite32(*(u32 *)ptr, add);
add += 4;
count -= 4;
ptr += 4;
Expand All @@ -221,7 +221,7 @@ ssize_t silly_write(struct file *filp, const char __user *buf, size_t count,

case M_16:
while (count >= 2) {
iowrite8(*(u16 *)ptr, add);
iowrite16(*(u16 *)ptr, add);
add += 2;
count -= 2;
ptr += 2;
Expand Down
2 changes: 1 addition & 1 deletion tty/tiny_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static void tiny_break_ctl(struct uart_port *port, int break_state)
}

static void tiny_set_termios(struct uart_port *port,
struct ktermios *new, struct ktermios *old)
struct ktermios *new, const struct ktermios *old)
{
int baud, quot, cflag = new->c_cflag;
/* get the byte size */
Expand Down
6 changes: 3 additions & 3 deletions tty/tiny_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static unsigned int tiny_write_room(struct tty_struct *tty)

#define RELEVANT_IFLAG(iflag) ((iflag) & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))

static void tiny_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
static void tiny_set_termios(struct tty_struct *tty, const struct ktermios *old_termios)
{
unsigned int cflag;

Expand Down Expand Up @@ -511,7 +511,7 @@ static int __init tiny_init(void)
int i;

/* allocate the tty driver */
tiny_tty_driver = alloc_tty_driver(TINY_TTY_MINORS);
tiny_tty_driver = tty_alloc_driver(TINY_TTY_MINORS, 0);
if (!tiny_tty_driver)
return -ENOMEM;

Expand All @@ -535,7 +535,7 @@ static int __init tiny_init(void)
retval = tty_register_driver(tiny_tty_driver);
if (retval) {
pr_err("failed to register tiny tty driver");
put_tty_driver(tiny_tty_driver);
tty_driver_kref_put(tiny_tty_driver);
return retval;
}

Expand Down