From patchwork Sun May 8 22:38:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucian Adrian Grijincu X-Patchwork-Id: 94703 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5A043B7041 for ; Mon, 9 May 2011 09:10:57 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932251Ab1EHXC7 (ORCPT ); Sun, 8 May 2011 19:02:59 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:51704 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932203Ab1EHWku (ORCPT ); Sun, 8 May 2011 18:40:50 -0400 Received: by mail-ww0-f44.google.com with SMTP id 36so5166752wwa.1 for ; Sun, 08 May 2011 15:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=7updo30QZU9gdLVwwAPj5w1sIZUsXtD9MGslfmWqesU=; b=LBXLMXHsYggF2SOBznCVoCEucV6EH7r1Nyzv2JA8dpnxTdYP0AoPiGiDDMmGknf0O/ GXBb2Essil2CPPJV6DvwIrroKtTL+Ts7gpvUSgKMdksjp6W8eaQsPC+/ms9PdCKyoCa1 Wj/n37dZTHR6KR0DmE+ZAyYLjywn+FFU9QAVg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=Ryw4XPqBHHVFX9UfaOB9VHpr2a8WSW9zmEH7jbAsh8+iGnN6C4YHP/kSnhSqdNImEY LpsdYBNJqqLwtpowg0OhQcG7UjjlyvJ4MTM/uFo3sPwRBn+psOvoyR7qwt+G3WsOD2yw qUGOYo5vbHtOUdKx/Jiyjq/3en3D2LXo1t43E= Received: by 10.216.237.138 with SMTP id y10mr2163753weq.30.1304894449483; Sun, 08 May 2011 15:40:49 -0700 (PDT) Received: from localhost.localdomain (aut75-5-82-239-182-128.fbx.proxad.net [82.239.182.128]) by mx.google.com with ESMTPS id ed10sm3390518wbb.66.2011.05.08.15.40.48 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 08 May 2011 15:40:48 -0700 (PDT) From: Lucian Adrian Grijincu To: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org, Lucian Adrian Grijincu Subject: [v2 019/115] sysctl: remove .child from kernel/pty Date: Mon, 9 May 2011 00:38:31 +0200 Message-Id: <1304894407-32201-20-git-send-email-lucian.grijincu@gmail.com> X-Mailer: git-send-email 1.7.5.134.g1c08b In-Reply-To: <1304894407-32201-1-git-send-email-lucian.grijincu@gmail.com> References: <1304894407-32201-1-git-send-email-lucian.grijincu@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Lucian Adrian Grijincu --- drivers/tty/pty.c | 23 +++++------------------ 1 files changed, 5 insertions(+), 18 deletions(-) diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 2107747..2a40b34 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -469,25 +469,12 @@ static struct ctl_table pty_table[] = { {} }; -static struct ctl_table pty_kern_table[] = { - { - .procname = "pty", - .mode = 0555, - .child = pty_table, - }, - {} +static const __initdata struct ctl_path pty_path[] = { + { .procname = "kernel" }, + { .procname = "pty" }, + { } }; -static struct ctl_table pty_root_table[] = { - { - .procname = "kernel", - .mode = 0555, - .child = pty_kern_table, - }, - {} -}; - - static int pty_unix98_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) { @@ -750,7 +737,7 @@ static void __init unix98_pty_init(void) if (tty_register_driver(pts_driver)) panic("Couldn't register Unix98 pts driver"); - register_sysctl_table(pty_root_table); + register_sysctl_paths(pty_path, pty_table); /* Now create the /dev/ptmx special device */ tty_default_fops(&ptmx_fops);