Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be9d1227 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by David S. Miller
Browse files

[Bluetooth]: Remove the usage of /proc completely



This patch removes all relics of the /proc usage from the Bluetooth
subsystem core and its upper layers. All the previous information are
now available via /sys/class/bluetooth through appropriate functions.

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ebb9252
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -57,8 +57,6 @@
#define BT_DBG(fmt, arg...)  printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg)
#define BT_ERR(fmt, arg...)  printk(KERN_ERR  "%s: " fmt "\n" , __FUNCTION__ , ## arg)

extern struct proc_dir_entry *proc_bt;

/* Connection and socket states */
enum {
	BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */
@@ -177,4 +175,6 @@ extern int hci_sock_cleanup(void);
extern int bt_sysfs_init(void);
extern void bt_sysfs_cleanup(void);

extern struct class bt_class;

#endif /* __BLUETOOTH_H */
+0 −7
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@
#ifndef __HCI_CORE_H
#define __HCI_CORE_H

#include <linux/proc_fs.h>
#include <net/bluetooth/hci.h>

/* HCI upper protocols */
@@ -34,8 +33,6 @@

#define HCI_INIT_TIMEOUT (HZ * 10)

extern struct proc_dir_entry *proc_bt_hci;

/* HCI Core structures */

struct inquiry_data {
@@ -126,10 +123,6 @@ struct hci_dev {

	atomic_t 		promisc;

#ifdef CONFIG_PROC_FS
	struct proc_dir_entry	*proc;
#endif

	struct class_device	class_dev;

	struct module 		*owner;
+0 −2
Original line number Diff line number Diff line
@@ -351,6 +351,4 @@ int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
int  rfcomm_init_ttys(void);
void rfcomm_cleanup_ttys(void);

extern struct proc_dir_entry *proc_bt_rfcomm;

#endif /* __RFCOMM_H */
+1 −11
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <net/sock.h>

#if defined(CONFIG_KMOD)
@@ -50,10 +49,7 @@
#define BT_DBG(D...)
#endif

#define VERSION "2.7"

struct proc_dir_entry *proc_bt;
EXPORT_SYMBOL(proc_bt);
#define VERSION "2.8"

/* Bluetooth sockets */
#define BT_MAX_PROTO	8
@@ -312,10 +308,6 @@ static int __init bt_init(void)
{
	BT_INFO("Core ver %s", VERSION);

	proc_bt = proc_mkdir("bluetooth", NULL);
	if (proc_bt)
		proc_bt->owner = THIS_MODULE;

	sock_register(&bt_sock_family_ops);

	BT_INFO("HCI device and connection manager initialized");
@@ -334,8 +326,6 @@ static void __exit bt_exit(void)
	bt_sysfs_cleanup();

	sock_unregister(PF_BLUETOOTH);

	remove_proc_entry("bluetooth", NULL);
}

subsys_initcall(bt_init);
+3 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ static void bt_release(struct class_device *cdev)
	kfree(hdev);
}

static struct class bt_class = {
struct class bt_class = {
	.name		= "bluetooth",
	.release	= bt_release,
#ifdef CONFIG_HOTPLUG
@@ -111,6 +111,8 @@ static struct class bt_class = {
#endif
};

EXPORT_SYMBOL_GPL(bt_class);

int hci_register_sysfs(struct hci_dev *hdev)
{
	struct class_device *cdev = &hdev->class_dev;
Loading