Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82712
b: refs/heads/master
c: e5f95c8
h: refs/heads/master
v: v3
  • Loading branch information
Sam Ravnborg committed Feb 3, 2008
1 parent 72b922c commit 9bcc19c
Show file tree
Hide file tree
Showing 120 changed files with 2,236 additions and 1,513 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f98735c9c24ea1f0d40a364d4e63611b689b795
refs/heads/master: e5f95c8b7700a7bf1c2d24eedc677954d9aa0285
6 changes: 3 additions & 3 deletions trunk/Documentation/driver-model/platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ None the less, there are some APIs to support such legacy drivers. Avoid
using these calls except with such hotplug-deficient drivers.

struct platform_device *platform_device_alloc(
const char *name, int id);
char *name, unsigned id);

You can use platform_device_alloc() to dynamically allocate a device, which
you will then initialize with resources and platform_device_register().
A better solution is usually:

struct platform_device *platform_device_register_simple(
const char *name, int id,
struct resource *res, unsigned int nres);
char *name, unsigned id,
struct resource *res, unsigned nres);

You can use platform_device_register_simple() as a one-step call to allocate
and register a device.
Expand Down
79 changes: 0 additions & 79 deletions trunk/Documentation/ja_JP/stable_kernel_rules.txt

This file was deleted.

25 changes: 25 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ S: Status, one of the following:
it has been replaced by a better system and you
should be using that.

3C359 NETWORK DRIVER
P: Mike Phillips
M: mikep@linuxtr.net
L: netdev@vger.kernel.org
W: http://www.linuxtr.net
S: Maintained

3C505 NETWORK DRIVER
P: Philip Blundell
M: philb@gnu.org
Expand Down Expand Up @@ -932,6 +939,8 @@ M: maxk@qualcomm.com
S: Maintained

BONDING DRIVER
P: Chad Tindel
M: ctindel@users.sourceforge.net
P: Jay Vosburgh
M: fubar@us.ibm.com
L: bonding-devel@lists.sourceforge.net
Expand Down Expand Up @@ -2855,6 +2864,15 @@ L: ocfs2-devel@oss.oracle.com
W: http://oss.oracle.com/projects/ocfs2/
S: Supported

OLYMPIC NETWORK DRIVER
P: Peter De Shrijver
M: p2@ace.ulyssis.student.kuleuven.ac.be
P: Mike Phillips
M: mikep@linuxtr.net
L: netdev@vger.kernel.org
W: http://www.linuxtr.net
S: Maintained

OMNIKEY CARDMAN 4000 DRIVER
P: Harald Welte
M: laforge@gnumonks.org
Expand Down Expand Up @@ -3770,6 +3788,13 @@ L: tlan-devel@lists.sourceforge.net (subscribers-only)
W: http://sourceforge.net/projects/tlan/
S: Maintained

TOKEN-RING NETWORK DRIVER
P: Mike Phillips
M: mikep@linuxtr.net
L: netdev@vger.kernel.org
W: http://www.linuxtr.net
S: Maintained

TOSHIBA ACPI EXTRAS DRIVER
P: John Belmonte
M: toshiba_acpi@memebeam.org
Expand Down
40 changes: 27 additions & 13 deletions trunk/drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,10 @@ struct kset *devices_kset;
int device_create_file(struct device *dev, struct device_attribute *attr)
{
int error = 0;
if (dev)
if (get_device(dev)) {
error = sysfs_create_file(&dev->kobj, &attr->attr);
put_device(dev);
}
return error;
}

Expand All @@ -435,8 +437,10 @@ int device_create_file(struct device *dev, struct device_attribute *attr)
*/
void device_remove_file(struct device *dev, struct device_attribute *attr)
{
if (dev)
if (get_device(dev)) {
sysfs_remove_file(&dev->kobj, &attr->attr);
put_device(dev);
}
}

/**
Expand Down Expand Up @@ -1140,11 +1144,25 @@ struct device *device_create(struct class *class, struct device *parent,
}
EXPORT_SYMBOL_GPL(device_create);

static int __match_devt(struct device *dev, void *data)
/**
* find_device - finds a device that was created with device_create()
* @class: pointer to the struct class that this device was registered with
* @devt: the dev_t of the device that was previously registered
*/
static struct device *find_device(struct class *class, dev_t devt)
{
dev_t *devt = data;
struct device *dev = NULL;
struct device *dev_tmp;

return dev->devt == *devt;
down(&class->sem);
list_for_each_entry(dev_tmp, &class->devices, node) {
if (dev_tmp->devt == devt) {
dev = dev_tmp;
break;
}
}
up(&class->sem);
return dev;
}

/**
Expand All @@ -1159,11 +1177,9 @@ void device_destroy(struct class *class, dev_t devt)
{
struct device *dev;

dev = class_find_device(class, &devt, __match_devt);
if (dev) {
put_device(dev);
dev = find_device(class, devt);
if (dev)
device_unregister(dev);
}
}
EXPORT_SYMBOL_GPL(device_destroy);

Expand All @@ -1187,11 +1203,9 @@ void destroy_suspended_device(struct class *class, dev_t devt)
{
struct device *dev;

dev = class_find_device(class, &devt, __match_devt);
if (dev) {
dev = find_device(class, devt);
if (dev)
device_pm_schedule_removal(dev);
put_device(dev);
}
}
EXPORT_SYMBOL_GPL(destroy_suspended_device);
#endif /* CONFIG_PM_SLEEP */
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/base/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ int driver_create_file(struct device_driver *drv,
struct driver_attribute *attr)
{
int error;
if (drv)
if (get_driver(drv)) {
error = sysfs_create_file(&drv->p->kobj, &attr->attr);
else
put_driver(drv);
} else
error = -EINVAL;
return error;
}
Expand All @@ -113,8 +114,10 @@ EXPORT_SYMBOL_GPL(driver_create_file);
void driver_remove_file(struct device_driver *drv,
struct driver_attribute *attr)
{
if (drv)
if (get_driver(drv)) {
sysfs_remove_file(&drv->p->kobj, &attr->attr);
put_driver(drv);
}
}
EXPORT_SYMBOL_GPL(driver_remove_file);

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ void device_pm_schedule_removal(struct device *dev)
list_move_tail(&dev->power.entry, &dpm_destroy);
mutex_unlock(&dpm_list_mtx);
}
EXPORT_SYMBOL_GPL(device_pm_schedule_removal);

/**
* pm_sleep_lock - mutual exclusion for registration and suspend
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/base/power/power.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static inline struct device *to_device(struct list_head *entry)

extern void device_pm_add(struct device *);
extern void device_pm_remove(struct device *);
extern void device_pm_schedule_removal(struct device *);
extern int pm_sleep_lock(void);
extern void pm_sleep_unlock(void);

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/char/drm/drm_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
vma->vm_ops = &drm_vm_dma_ops;

vma->vm_flags |= VM_RESERVED; /* Don't swap */
vma->vm_flags |= VM_DONTEXPAND;

vma->vm_file = filp; /* Needed for drm_vm_open() */
drm_vm_open_locked(vma);
Expand Down Expand Up @@ -656,7 +655,6 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
return -EINVAL; /* This should never happen. */
}
vma->vm_flags |= VM_RESERVED; /* Don't swap */
vma->vm_flags |= VM_DONTEXPAND;

vma->vm_file = filp; /* Needed for drm_vm_open() */
drm_vm_open_locked(vma);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/mspec.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ mspec_mmap(struct file *file, struct vm_area_struct *vma,
vdata->refcnt = ATOMIC_INIT(1);
vma->vm_private_data = vdata;

vma->vm_flags |= (VM_IO | VM_RESERVED | VM_PFNMAP | VM_DONTEXPAND);
vma->vm_flags |= (VM_IO | VM_RESERVED | VM_PFNMAP);
if (vdata->type == MSPEC_FETCHOP || vdata->type == MSPEC_UNCACHED)
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
vma->vm_ops = &mspec_vm_ops;
Expand Down
Loading

0 comments on commit 9bcc19c

Please sign in to comment.