mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: len.brown@intel.com, LKML <linux-kernel@vger.kernel.org>,
	linux-acpi@vger.kernel.org,
	Karol Kozimor <sziwan@users.sourceforge.net>,
	Julien Lerouge <julien.lerouge@free.fr>,
	acpi4asus-user@lists.sourceforge.net,
	Stelian Pop <stelian@popies.net>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] ACPI: remove __init/__exit from Asus and Sony .add()/.remove() methods
Date: Wed, 1 Mar 2006 13:51:21 -0700	[thread overview]
Message-ID: <200603011351.21322.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <200603011215.59604.bjorn.helgaas@hp.com>

Even though the devices claimed by asus_acpi.c and sony_acpi.c can not
be hot-plugged, the driver registration infrastructure allows the .add()
and .remove() methods to be called at any time while the driver is
registered.  So remove __init and __exit from them.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work-mm4/drivers/acpi/asus_acpi.c
===================================================================
--- work-mm4.orig/drivers/acpi/asus_acpi.c	2006-02-22 09:55:50.000000000 -0700
+++ work-mm4/drivers/acpi/asus_acpi.c	2006-03-01 12:17:50.000000000 -0700
@@ -817,7 +817,7 @@
 			      unsigned long count, void *data);
 
 static int
-__init asus_proc_add(char *name, proc_writefunc * writefunc,
+asus_proc_add(char *name, proc_writefunc * writefunc,
 		     proc_readfunc * readfunc, mode_t mode,
 		     struct acpi_device *device)
 {
@@ -836,7 +836,7 @@
 	return 0;
 }
 
-static int __init asus_hotk_add_fs(struct acpi_device *device)
+static int asus_hotk_add_fs(struct acpi_device *device)
 {
 	struct proc_dir_entry *proc;
 	mode_t mode;
@@ -954,7 +954,7 @@
  * This function is used to initialize the hotk with right values. In this
  * method, we can make all the detection we want, and modify the hotk struct
  */
-static int __init asus_hotk_get_info(void)
+static int asus_hotk_get_info(void)
 {
 	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 	struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -1101,7 +1101,7 @@
 	return AE_OK;
 }
 
-static int __init asus_hotk_check(void)
+static int asus_hotk_check(void)
 {
 	int result = 0;
 
@@ -1121,7 +1121,7 @@
 
 static int asus_hotk_found;
 
-static int __init asus_hotk_add(struct acpi_device *device)
+static int asus_hotk_add(struct acpi_device *device)
 {
 	acpi_status status = AE_OK;
 	int result;
Index: work-mm4/drivers/acpi/sony_acpi.c
===================================================================
--- work-mm4.orig/drivers/acpi/sony_acpi.c	2006-02-22 09:55:50.000000000 -0700
+++ work-mm4/drivers/acpi/sony_acpi.c	2006-03-01 12:18:24.000000000 -0700
@@ -258,7 +258,7 @@
 	return AE_OK;
 }
 
-static int __init sony_acpi_add(struct acpi_device *device)
+static int sony_acpi_add(struct acpi_device *device)
 {
 	acpi_status status;
 	int result;
@@ -340,7 +340,7 @@
 }
 
 
-static int __exit sony_acpi_remove(struct acpi_device *device, int type)
+static int sony_acpi_remove(struct acpi_device *device, int type)
 {
 	acpi_status status;
 	struct sony_acpi_value *item;

      reply	other threads:[~2006-03-01 20:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-26  9:42 Use of __init in asus_acpi.c + sony_acpi.c? Sam Ravnborg
2006-03-01 19:15 ` Bjorn Helgaas
2006-03-01 20:51   ` Bjorn Helgaas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200603011351.21322.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=akpm@osdl.org \
    --cc=julien.lerouge@free.fr \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=stelian@popies.net \
    --cc=sziwan@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®