diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/CodingStyle | 18 | ||||
-rw-r--r-- | Documentation/block/biodoc.txt | 7 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 8 | ||||
-rw-r--r-- | Documentation/powerpc/booting-without-of.txt | 19 | ||||
-rw-r--r-- | Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 8 |
5 files changed, 48 insertions, 12 deletions
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 0ad6dcb5d45f..9069189e78ef 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
@@ -682,6 +682,24 @@ result. Typical examples would be functions that return pointers; they use | |||
682 | NULL or the ERR_PTR mechanism to report failure. | 682 | NULL or the ERR_PTR mechanism to report failure. |
683 | 683 | ||
684 | 684 | ||
685 | Chapter 17: Don't re-invent the kernel macros | ||
686 | |||
687 | The header file include/linux/kernel.h contains a number of macros that | ||
688 | you should use, rather than explicitly coding some variant of them yourself. | ||
689 | For example, if you need to calculate the length of an array, take advantage | ||
690 | of the macro | ||
691 | |||
692 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | ||
693 | |||
694 | Similarly, if you need to calculate the size of some structure member, use | ||
695 | |||
696 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | ||
697 | |||
698 | There are also min() and max() macros that do strict type checking if you | ||
699 | need them. Feel free to peruse that header file to see what else is already | ||
700 | defined that you shouldn't reproduce in your code. | ||
701 | |||
702 | |||
685 | 703 | ||
686 | Appendix I: References | 704 | Appendix I: References |
687 | 705 | ||
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index c6c9a9c10d7f..3adaace328a6 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -946,6 +946,13 @@ elevator_merged_fn called when a request in the scheduler has been | |||
946 | scheduler for example, to reposition the request | 946 | scheduler for example, to reposition the request |
947 | if its sorting order has changed. | 947 | if its sorting order has changed. |
948 | 948 | ||
949 | elevator_allow_merge_fn called whenever the block layer determines | ||
950 | that a bio can be merged into an existing | ||
951 | request safely. The io scheduler may still | ||
952 | want to stop a merge at this point if it | ||
953 | results in some sort of conflict internally, | ||
954 | this hook allows it to do that. | ||
955 | |||
949 | elevator_dispatch_fn fills the dispatch queue with ready requests. | 956 | elevator_dispatch_fn fills the dispatch queue with ready requests. |
950 | I/O schedulers are free to postpone requests by | 957 | I/O schedulers are free to postpone requests by |
951 | not filling the dispatch queue unless @force | 958 | not filling the dispatch queue unless @force |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index ef69c75780bf..25d298517104 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1714,6 +1714,14 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1714 | uart6850= [HW,OSS] | 1714 | uart6850= [HW,OSS] |
1715 | Format: <io>,<irq> | 1715 | Format: <io>,<irq> |
1716 | 1716 | ||
1717 | uhci-hcd.ignore_oc= | ||
1718 | [USB] Ignore overcurrent events (default N). | ||
1719 | Some badly-designed motherboards generate lots of | ||
1720 | bogus events, for ports that aren't wired to | ||
1721 | anything. Set this parameter to avoid log spamming. | ||
1722 | Note that genuine overcurrent events won't be | ||
1723 | reported either. | ||
1724 | |||
1717 | usbhid.mousepoll= | 1725 | usbhid.mousepoll= |
1718 | [USBHID] The interval which mice are to be polled at. | 1726 | [USBHID] The interval which mice are to be polled at. |
1719 | 1727 | ||
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index b3bd36668db3..33994271cb3b 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -1703,29 +1703,32 @@ platforms are moved over to use the flattened-device-tree model. | |||
1703 | Required properties: | 1703 | Required properties: |
1704 | 1704 | ||
1705 | - device_type : has to be "rom" | 1705 | - device_type : has to be "rom" |
1706 | - compatible : Should specify what this ROM device is compatible with | 1706 | - compatible : Should specify what this flash device is compatible with. |
1707 | (i.e. "onenand"). Currently, this is most likely to be "direct-mapped" | 1707 | Currently, this is most likely to be "direct-mapped" (which |
1708 | (which corresponds to the MTD physmap mapping driver). | 1708 | corresponds to the MTD physmap mapping driver). |
1709 | - regs : Offset and length of the register set (or memory mapping) for | 1709 | - reg : Offset and length of the register set (or memory mapping) for |
1710 | the device. | 1710 | the device. |
1711 | - bank-width : Width of the flash data bus in bytes. Required | ||
1712 | for the NOR flashes (compatible == "direct-mapped" and others) ONLY. | ||
1711 | 1713 | ||
1712 | Recommended properties : | 1714 | Recommended properties : |
1713 | 1715 | ||
1714 | - bank-width : Width of the flash data bus in bytes. Required | ||
1715 | for the NOR flashes (compatible == "direct-mapped" and others) ONLY. | ||
1716 | - partitions : Several pairs of 32-bit values where the first value is | 1716 | - partitions : Several pairs of 32-bit values where the first value is |
1717 | partition's offset from the start of the device and the second one is | 1717 | partition's offset from the start of the device and the second one is |
1718 | partition size in bytes with LSB used to signify a read only | 1718 | partition size in bytes with LSB used to signify a read only |
1719 | partititon (so, the parition size should always be an even number). | 1719 | partition (so, the parition size should always be an even number). |
1720 | - partition-names : The list of concatenated zero terminated strings | 1720 | - partition-names : The list of concatenated zero terminated strings |
1721 | representing the partition names. | 1721 | representing the partition names. |
1722 | - probe-type : The type of probe which should be done for the chip | ||
1723 | (JEDEC vs CFI actually). Valid ONLY for NOR flashes. | ||
1722 | 1724 | ||
1723 | Example: | 1725 | Example: |
1724 | 1726 | ||
1725 | flash@ff000000 { | 1727 | flash@ff000000 { |
1726 | device_type = "rom"; | 1728 | device_type = "rom"; |
1727 | compatible = "direct-mapped"; | 1729 | compatible = "direct-mapped"; |
1728 | regs = <ff000000 01000000>; | 1730 | probe-type = "CFI"; |
1731 | reg = <ff000000 01000000>; | ||
1729 | bank-width = <4>; | 1732 | bank-width = <4>; |
1730 | partitions = <00000000 00f80000 | 1733 | partitions = <00000000 00f80000 |
1731 | 00f80000 00080001>; | 1734 | 00f80000 00080001>; |
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index 077fbe25ebf4..ccd0a953953d 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -927,7 +927,7 @@ | |||
927 | <informalexample> | 927 | <informalexample> |
928 | <programlisting> | 928 | <programlisting> |
929 | <![CDATA[ | 929 | <![CDATA[ |
930 | struct mychip *chip = (struct mychip *)card->private_data; | 930 | struct mychip *chip = card->private_data; |
931 | ]]> | 931 | ]]> |
932 | </programlisting> | 932 | </programlisting> |
933 | </informalexample> | 933 | </informalexample> |
@@ -1095,7 +1095,7 @@ | |||
1095 | 1095 | ||
1096 | /* release the irq */ | 1096 | /* release the irq */ |
1097 | if (chip->irq >= 0) | 1097 | if (chip->irq >= 0) |
1098 | free_irq(chip->irq, (void *)chip); | 1098 | free_irq(chip->irq, chip); |
1099 | /* release the i/o ports & memory */ | 1099 | /* release the i/o ports & memory */ |
1100 | pci_release_regions(chip->pci); | 1100 | pci_release_regions(chip->pci); |
1101 | /* disable the PCI entry */ | 1101 | /* disable the PCI entry */ |
@@ -1148,7 +1148,7 @@ | |||
1148 | } | 1148 | } |
1149 | chip->port = pci_resource_start(pci, 0); | 1149 | chip->port = pci_resource_start(pci, 0); |
1150 | if (request_irq(pci->irq, snd_mychip_interrupt, | 1150 | if (request_irq(pci->irq, snd_mychip_interrupt, |
1151 | IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) { | 1151 | IRQF_SHARED, "My Chip", chip)) { |
1152 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); | 1152 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); |
1153 | snd_mychip_free(chip); | 1153 | snd_mychip_free(chip); |
1154 | return -EBUSY; | 1154 | return -EBUSY; |
@@ -1387,7 +1387,7 @@ | |||
1387 | <programlisting> | 1387 | <programlisting> |
1388 | <![CDATA[ | 1388 | <![CDATA[ |
1389 | if (chip->irq >= 0) | 1389 | if (chip->irq >= 0) |
1390 | free_irq(chip->irq, (void *)chip); | 1390 | free_irq(chip->irq, chip); |
1391 | ]]> | 1391 | ]]> |
1392 | </programlisting> | 1392 | </programlisting> |
1393 | </informalexample> | 1393 | </informalexample> |