Messages in this thread | | | Date | Fri, 4 Dec 2009 20:15:07 -0800 | From | Greg KH <> | Subject | Re: [PATCH 11/31] Constify struct file_operations for 2.6.32 v1 |
| |
On Sat, Dec 05, 2009 at 03:50:23AM +0100, Emese Revfy wrote: > Greg KH wrote: > > On Sat, Dec 05, 2009 at 01:02:59AM +0100, Emese Revfy wrote: > >> -static struct file_operations ptmx_fops; > >> +static const struct file_operations ptmx_fops = { > >> + .llseek = no_llseek, > >> + .read = tty_read, > >> + .write = tty_write, > >> + .poll = tty_poll, > >> + .unlocked_ioctl = tty_ioctl, > >> + .compat_ioctl = tty_compat_ioctl, > >> + .open = ptmx_open, > >> + .release = tty_release, > >> + .fasync = tty_fasync, > >> +}; > > > > You just made these functions all global, for no real good reason. Why > > did you do this? > > I think this is the only way to make ptmx_fops const, provided we want to.
Why do we want to?
thanks,
greg k-h
| |