Skip to content

Commit

Permalink
Merge tag 'char-misc-3.8-rc1' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/gregkh/char-misc

Pull Char/Misc driver merge from Greg Kroah-Hartman:
 "Here is the "big" char/misc driver patches for 3.8-rc1.  I'm starting
  to put random driver subsystems that I had previously sent you through
  the driver-core tree in this tree, as it makes more sense to do so.

  Nothing major here, the various __dev* removals, some mei driver
  updates, and other random driver-specific things from the different
  maintainers and developers.

  Note, some MFD drivers got added through this tree, and they are also
  coming in through the "real" MFD tree as well, due to some major
  mis-communication between me and the different developers.  If you
  have any merge conflicts, take the ones from the MFD tree, not these
  ones, sorry about that.

  All of this has been in linux-next for a while.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

Fix up trivial conflict in drivers/mmc/host/Kconfig due to new drivers
having been added (both at the end, as usual..)

* tag 'char-misc-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (84 commits)
  MAINTAINERS: remove drivers/staging/hv/
  misc/st_kim: Free resources in the error path of probe()
  drivers/char: for hpet, add count checking, and ~0UL instead of -1
  w1-gpio: Simplify & get rid of defines
  w1-gpio: Pinctrl-fy
  extcon: remove use of __devexit_p
  extcon: remove use of __devinit
  extcon: remove use of __devexit
  drivers: uio: Only allocate new private data when probing device tree node
  drivers: uio_dmem_genirq: Allow partial success when opening device
  drivers: uio_dmem_genirq: Don't use DMA_ERROR_CODE to indicate unmapped regions
  drivers: uio_dmem_genirq: Don't mix address spaces for dynamic region vaddr
  uio: remove use of __devexit
  uio: remove use of __devinitdata
  uio: remove use of __devinit
  uio: remove use of __devexit_p
  char: remove use of __devexit
  char: remove use of __devinitconst
  char: remove use of __devinitdata
  char: remove use of __devinit
  ...
  • Loading branch information
torvalds committed Dec 11, 2012
2 parents cff2f74 + 70e78c4 commit 6a5971d
Show file tree
Hide file tree
Showing 135 changed files with 8,217 additions and 1,867 deletions.
56 changes: 56 additions & 0 deletions Documentation/DocBook/uio-howto.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,62 @@ framework to set up sysfs files for this region. Simply leave it alone.
</para>
</sect1>

<sect1 id="using uio_dmem_genirq">
<title>Using uio_dmem_genirq for platform devices</title>
<para>
In addition to statically allocated memory ranges, they may also be
a desire to use dynamically allocated regions in a user space driver.
In particular, being able to access memory made available through the
dma-mapping API, may be particularly useful. The
<varname>uio_dmem_genirq</varname> driver provides a way to accomplish
this.
</para>
<para>
This driver is used in a similar manner to the
<varname>"uio_pdrv_genirq"</varname> driver with respect to interrupt
configuration and handling.
</para>
<para>
Set the <varname>.name</varname> element of
<varname>struct platform_device</varname> to
<varname>"uio_dmem_genirq"</varname> to use this driver.
</para>
<para>
When using this driver, fill in the <varname>.platform_data</varname>
element of <varname>struct platform_device</varname>, which is of type
<varname>struct uio_dmem_genirq_pdata</varname> and which contains the
following elements:
</para>
<itemizedlist>
<listitem><varname>struct uio_info uioinfo</varname>: The same
structure used as the <varname>uio_pdrv_genirq</varname> platform
data</listitem>
<listitem><varname>unsigned int *dynamic_region_sizes</varname>:
Pointer to list of sizes of dynamic memory regions to be mapped into
user space.
</listitem>
<listitem><varname>unsigned int num_dynamic_regions</varname>:
Number of elements in <varname>dynamic_region_sizes</varname> array.
</listitem>
</itemizedlist>
<para>
The dynamic regions defined in the platform data will be appended to
the <varname> mem[] </varname> array after the platform device
resources, which implies that the total number of static and dynamic
memory regions cannot exceed <varname>MAX_UIO_MAPS</varname>.
</para>
<para>
The dynamic memory regions will be allocated when the UIO device file,
<varname>/dev/uioX</varname> is opened.
Simiar to static memory resources, the memory region information for
dynamic regions is then visible via sysfs at
<varname>/sys/class/uio/uioX/maps/mapY/*</varname>.
The dynmaic memory regions will be freed when the UIO device file is
closed. When no processes are holding the device file open, the address
returned to userspace is ~0.
</para>
</sect1>

</chapter>

<chapter id="userspace_driver" xreflabel="Writing a driver in user space">
Expand Down
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3596,7 +3596,6 @@ S: Maintained
F: drivers/hv/
F: drivers/hid/hid-hyperv.c
F: drivers/net/hyperv/
F: drivers/staging/hv/

I2C OVER PARALLEL PORT
M: Jean Delvare <khali@linux-fr.org>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);

#ifdef CONFIG_MMU
#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
extern int valid_phys_addr_range(unsigned long addr, size_t size);
extern int valid_phys_addr_range(phys_addr_t addr, size_t size);
extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
extern int devmem_is_allowed(unsigned long pfn);
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
* You really shouldn't be using read() or write() on /dev/mem. This
* might go away in the future.
*/
int valid_phys_addr_range(unsigned long addr, size_t size)
int valid_phys_addr_range(phys_addr_t addr, size_t size)
{
if (addr < PHYS_OFFSET)
return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ phys_to_virt (unsigned long address)

#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
extern u64 kern_mem_attribute (unsigned long phys_addr, unsigned long size);
extern int valid_phys_addr_range (unsigned long addr, size_t count); /* efi.c */
extern int valid_phys_addr_range (phys_addr_t addr, size_t count); /* efi.c */
extern int valid_mmap_phys_addr_range (unsigned long pfn, size_t count);

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ kern_mem_attribute (unsigned long phys_addr, unsigned long size)
EXPORT_SYMBOL(kern_mem_attribute);

int
valid_phys_addr_range (unsigned long phys_addr, unsigned long size)
valid_phys_addr_range (phys_addr_t phys_addr, unsigned long size)
{
u64 attr;

Expand Down
2 changes: 1 addition & 1 deletion arch/sh/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }
#define xlate_dev_kmem_ptr(p) p

#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
int valid_phys_addr_range(unsigned long addr, size_t size);
int valid_phys_addr_range(phys_addr_t addr, size_t size);
int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);

#endif /* __KERNEL__ */
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
* You really shouldn't be using read() or write() on /dev/mem. This
* might go away in the future.
*/
int valid_phys_addr_range(unsigned long addr, size_t count)
int valid_phys_addr_range(phys_addr_t addr, size_t count)
{
if (addr < __MEMORY_START)
return 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/agp/ali-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static const struct agp_bridge_driver ali_m1541_bridge = {
};


static struct agp_device_ids ali_agp_device_ids[] __devinitdata =
static struct agp_device_ids ali_agp_device_ids[] =
{
{
.device_id = PCI_DEVICE_ID_AL_M1541,
Expand Down Expand Up @@ -374,7 +374,7 @@ static int __devinit agp_ali_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_ali_remove(struct pci_dev *pdev)
static void agp_ali_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/agp/amd-k7-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ static const struct agp_bridge_driver amd_irongate_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type,
};

static struct agp_device_ids amd_agp_device_ids[] __devinitdata =
static struct agp_device_ids amd_agp_device_ids[] =
{
{
.device_id = PCI_DEVICE_ID_AMD_FE_GATE_7006,
Expand Down Expand Up @@ -480,7 +480,7 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_amdk7_remove(struct pci_dev *pdev)
static void agp_amdk7_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/amd64-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
return 0;
}

static void __devexit agp_amd64_remove(struct pci_dev *pdev)
static void agp_amd64_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/agp/ati-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static const struct agp_bridge_driver ati_generic_bridge = {
};


static struct agp_device_ids ati_agp_device_ids[] __devinitdata =
static struct agp_device_ids ati_agp_device_ids[] =
{
{
.device_id = PCI_DEVICE_ID_ATI_RS100,
Expand Down Expand Up @@ -533,7 +533,7 @@ static int __devinit agp_ati_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_ati_remove(struct pci_dev *pdev)
static void agp_ati_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/efficeon-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_efficeon_remove(struct pci_dev *pdev)
static void agp_efficeon_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/i460-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ static int __devinit agp_intel_i460_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_intel_i460_remove(struct pci_dev *pdev)
static void agp_intel_i460_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/intel-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
return err;
}

static void __devexit agp_intel_remove(struct pci_dev *pdev)
static void agp_intel_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/nvidia-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ static int __devinit agp_nvidia_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_nvidia_remove(struct pci_dev *pdev)
static void agp_nvidia_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/sgi-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static int __devinit agp_sgi_init(void)
return 0;
}

static void __devexit agp_sgi_cleanup(void)
static void agp_sgi_cleanup(void)
{
kfree(sgi_tioca_agp_bridges);
sgi_tioca_agp_bridges = NULL;
Expand Down
8 changes: 4 additions & 4 deletions drivers/char/agp/sis-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#define PCI_DEVICE_ID_SI_662 0x0662
#define PCI_DEVICE_ID_SI_671 0x0671

static bool __devinitdata agp_sis_force_delay = 0;
static int __devinitdata agp_sis_agp_spec = -1;
static bool agp_sis_force_delay = 0;
static int agp_sis_agp_spec = -1;

static int sis_fetch_size(void)
{
Expand Down Expand Up @@ -148,7 +148,7 @@ static struct agp_bridge_driver sis_driver = {
};

// chipsets that require the 'delay hack'
static int sis_broken_chipsets[] __devinitdata = {
static int sis_broken_chipsets[] = {
PCI_DEVICE_ID_SI_648,
PCI_DEVICE_ID_SI_746,
0 // terminator
Expand Down Expand Up @@ -211,7 +211,7 @@ static int __devinit agp_sis_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_sis_remove(struct pci_dev *pdev)
static void agp_sis_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/sworks-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_serverworks_remove(struct pci_dev *pdev)
static void agp_serverworks_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/agp/uninorth-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ const struct agp_bridge_driver u3_agp_driver = {
.needs_scratch_page = true,
};

static struct agp_device_ids uninorth_agp_device_ids[] __devinitdata = {
static struct agp_device_ids uninorth_agp_device_ids[] = {
{
.device_id = PCI_DEVICE_ID_APPLE_UNI_N_AGP,
.chipset_name = "UniNorth",
Expand Down Expand Up @@ -663,7 +663,7 @@ static int __devinit agp_uninorth_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_uninorth_remove(struct pci_dev *pdev)
static void agp_uninorth_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/agp/via-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static const struct agp_bridge_driver via_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type,
};

static struct agp_device_ids via_agp_device_ids[] __devinitdata =
static struct agp_device_ids via_agp_device_ids[] =
{
{
.device_id = PCI_DEVICE_ID_VIA_82C597_0,
Expand Down Expand Up @@ -485,7 +485,7 @@ static int __devinit agp_via_probe(struct pci_dev *pdev,
return agp_add_bridge(bridge);
}

static void __devexit agp_via_remove(struct pci_dev *pdev)
static void agp_via_remove(struct pci_dev *pdev)
{
struct agp_bridge_data *bridge = pci_get_drvdata(pdev);

Expand Down
5 changes: 4 additions & 1 deletion drivers/char/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ static unsigned long __hpet_calibrate(struct hpets *hpetp)

static unsigned long hpet_calibrate(struct hpets *hpetp)
{
unsigned long ret = -1;
unsigned long ret = ~0UL;
unsigned long tmp;

/*
Expand Down Expand Up @@ -1001,6 +1001,9 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
irqp = &res->data.extended_irq;

for (i = 0; i < irqp->interrupt_count; i++) {
if (hdp->hd_nirqs >= HPET_MAX_TIMERS)
break;

irq = acpi_register_gsi(NULL, irqp->interrupts[i],
irqp->triggering, irqp->polarity);
if (irq < 0)
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hw_random/atmel-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
return ret;
}

static int __devexit atmel_trng_remove(struct platform_device *pdev)
static int atmel_trng_remove(struct platform_device *pdev)
{
struct atmel_trng *trng = platform_get_drvdata(pdev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hw_random/bcm63xx-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int __devinit bcm63xx_rng_probe(struct platform_device *pdev)
return ret;
}

static int __devexit bcm63xx_rng_remove(struct platform_device *pdev)
static int bcm63xx_rng_remove(struct platform_device *pdev)
{
struct hwrng *rng = platform_get_drvdata(pdev);
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hw_random/exynos-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static int __devinit exynos_rng_probe(struct platform_device *pdev)
return hwrng_register(&exynos_rng->rng);
}

static int __devexit exynos_rng_remove(struct platform_device *pdev)
static int exynos_rng_remove(struct platform_device *pdev)
{
struct exynos_rng *exynos_rng = platform_get_drvdata(pdev);

Expand Down
4 changes: 2 additions & 2 deletions drivers/char/hw_random/n2-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define DRV_MODULE_VERSION "0.2"
#define DRV_MODULE_RELDATE "July 27, 2011"

static char version[] __devinitdata =
static char version[] =
DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";

MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
Expand Down Expand Up @@ -719,7 +719,7 @@ static int __devinit n2rng_probe(struct platform_device *op)
return err;
}

static int __devexit n2rng_remove(struct platform_device *op)
static int n2rng_remove(struct platform_device *op)
{
struct n2rng *np = dev_get_drvdata(&op->dev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hw_random/pasemi-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static int __devinit rng_probe(struct platform_device *ofdev)
return err;
}

static int __devexit rng_remove(struct platform_device *dev)
static int rng_remove(struct platform_device *dev)
{
void __iomem *rng_regs = (void __iomem *)pasemi_rng.priv;

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hw_random/picoxcell-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static int picoxcell_trng_probe(struct platform_device *pdev)
return ret;
}

static int __devexit picoxcell_trng_remove(struct platform_device *pdev)
static int picoxcell_trng_remove(struct platform_device *pdev)
{
hwrng_unregister(&picoxcell_trng);
clk_disable(rng_clk);
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hw_random/ppc4xx-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static int __devinit ppc4xx_rng_probe(struct platform_device *dev)
return err;
}

static int __devexit ppc4xx_rng_remove(struct platform_device *dev)
static int ppc4xx_rng_remove(struct platform_device *dev)
{
void __iomem *rng_regs = (void __iomem *) ppc4xx_rng.priv;

Expand Down
Loading

0 comments on commit 6a5971d

Please sign in to comment.