Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: ozwpan: Fix Documentation style.

This patch fixes Kernel Documentation style.

Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rupesh Gujare and committed by
Greg Kroah-Hartman
4e7fb829 dfc065f1

+179 -218
+19 -21
drivers/staging/ozwpan/ozcdev.c
··· 18 18 #include "ozpd.h" 19 19 #include "ozproto.h" 20 20 #include "ozcdev.h" 21 - /*------------------------------------------------------------------------------ 22 - */ 21 + 23 22 #define OZ_RD_BUF_SZ 256 24 23 struct oz_cdev { 25 24 dev_t devnum; ··· 38 39 int rd_in; 39 40 int rd_out; 40 41 }; 41 - /*------------------------------------------------------------------------------ 42 - */ 42 + 43 43 static struct oz_cdev g_cdev; 44 44 static struct class *g_oz_class; 45 45 46 - /*------------------------------------------------------------------------------ 46 + /* 47 47 * Context: process and softirq 48 48 */ 49 49 static struct oz_serial_ctx *oz_cdev_claim_ctx(struct oz_pd *pd) ··· 57 59 return ctx; 58 60 } 59 61 60 - /*------------------------------------------------------------------------------ 62 + /* 61 63 * Context: softirq or process 62 64 */ 63 65 static void oz_cdev_release_ctx(struct oz_serial_ctx *ctx) ··· 68 70 } 69 71 } 70 72 71 - /*------------------------------------------------------------------------------ 73 + /* 72 74 * Context: process 73 75 */ 74 76 static int oz_cdev_open(struct inode *inode, struct file *filp) ··· 81 83 return 0; 82 84 } 83 85 84 - /*------------------------------------------------------------------------------ 86 + /* 85 87 * Context: process 86 88 */ 87 89 static int oz_cdev_release(struct inode *inode, struct file *filp) ··· 89 91 return 0; 90 92 } 91 93 92 - /*------------------------------------------------------------------------------ 94 + /* 93 95 * Context: process 94 96 */ 95 97 static ssize_t oz_cdev_read(struct file *filp, char __user *buf, size_t count, ··· 142 144 return count; 143 145 } 144 146 145 - /*------------------------------------------------------------------------------ 147 + /* 146 148 * Context: process 147 149 */ 148 150 static ssize_t oz_cdev_write(struct file *filp, const char __user *buf, ··· 200 202 return count; 201 203 } 202 204 203 - /*------------------------------------------------------------------------------ 205 + /* 204 206 * Context: process 205 207 */ 206 208 static int oz_set_active_pd(const u8 *addr) ··· 235 237 return rc; 236 238 } 237 239 238 - /*------------------------------------------------------------------------------ 240 + /* 239 241 * Context: process 240 242 */ 241 243 static long oz_cdev_ioctl(struct file *filp, unsigned int cmd, ··· 303 305 return rc; 304 306 } 305 307 306 - /*------------------------------------------------------------------------------ 308 + /* 307 309 * Context: process 308 310 */ 309 311 static unsigned int oz_cdev_poll(struct file *filp, poll_table *wait) ··· 327 329 return ret; 328 330 } 329 331 330 - /*------------------------------------------------------------------------------ 332 + /* 331 333 */ 332 334 static const struct file_operations oz_fops = { 333 335 .owner = THIS_MODULE, ··· 339 341 .poll = oz_cdev_poll 340 342 }; 341 343 342 - /*------------------------------------------------------------------------------ 344 + /* 343 345 * Context: process 344 346 */ 345 347 int oz_cdev_register(void) ··· 384 386 return err; 385 387 } 386 388 387 - /*------------------------------------------------------------------------------ 389 + /* 388 390 * Context: process 389 391 */ 390 392 int oz_cdev_deregister(void) ··· 398 400 return 0; 399 401 } 400 402 401 - /*------------------------------------------------------------------------------ 403 + /* 402 404 * Context: process 403 405 */ 404 406 int oz_cdev_init(void) ··· 407 409 return 0; 408 410 } 409 411 410 - /*------------------------------------------------------------------------------ 412 + /* 411 413 * Context: process 412 414 */ 413 415 void oz_cdev_term(void) ··· 415 417 oz_app_enable(OZ_APPID_SERIAL, 0); 416 418 } 417 419 418 - /*------------------------------------------------------------------------------ 420 + /* 419 421 * Context: softirq-serialized 420 422 */ 421 423 int oz_cdev_start(struct oz_pd *pd, int resume) ··· 453 455 return 0; 454 456 } 455 457 456 - /*------------------------------------------------------------------------------ 458 + /* 457 459 * Context: softirq or process 458 460 */ 459 461 void oz_cdev_stop(struct oz_pd *pd, int pause) ··· 483 485 oz_dbg(ON, "Serial service stopped\n"); 484 486 } 485 487 486 - /*------------------------------------------------------------------------------ 488 + /* 487 489 * Context: softirq-serialized 488 490 */ 489 491 void oz_cdev_rx(struct oz_pd *pd, struct oz_elt *elt)
+6 -21
drivers/staging/ozwpan/ozeltbuf.c
··· 11 11 #include "ozeltbuf.h" 12 12 #include "ozpd.h" 13 13 14 - /*------------------------------------------------------------------------------ 15 - */ 16 14 #define OZ_ELT_INFO_MAGIC_USED 0x35791057 17 15 #define OZ_ELT_INFO_MAGIC_FREE 0x78940102 18 - /*------------------------------------------------------------------------------ 16 + 17 + /* 19 18 * Context: softirq-serialized 20 19 */ 21 20 int oz_elt_buf_init(struct oz_elt_buf *buf) ··· 28 29 return 0; 29 30 } 30 31 31 - /*------------------------------------------------------------------------------ 32 + /* 32 33 * Context: softirq or process 33 34 */ 34 35 void oz_elt_buf_term(struct oz_elt_buf *buf) ··· 61 62 buf->free_elts = 0; 62 63 } 63 64 64 - /*------------------------------------------------------------------------------ 65 + /* 65 66 * Context: softirq or process 66 67 */ 67 68 struct oz_elt_info *oz_elt_info_alloc(struct oz_elt_buf *buf) ··· 95 96 return ei; 96 97 } 97 98 98 - /*------------------------------------------------------------------------------ 99 + /* 99 100 * Precondition: oz_elt_buf.lock must be held. 100 101 * Context: softirq or process 101 102 */ ··· 132 133 spin_unlock_bh(&buf->lock); 133 134 } 134 135 135 - /*------------------------------------------------------------------------------ 136 - */ 137 136 int oz_elt_stream_create(struct oz_elt_buf *buf, u8 id, int max_buf_count) 138 137 { 139 138 struct oz_elt_stream *st; ··· 151 154 return 0; 152 155 } 153 156 154 - /*------------------------------------------------------------------------------ 155 - */ 156 157 int oz_elt_stream_delete(struct oz_elt_buf *buf, u8 id) 157 158 { 158 159 struct list_head *e; ··· 189 194 return 0; 190 195 } 191 196 192 - /*------------------------------------------------------------------------------ 193 - */ 194 197 void oz_elt_stream_get(struct oz_elt_stream *st) 195 198 { 196 199 atomic_inc(&st->ref_count); 197 200 } 198 201 199 - /*------------------------------------------------------------------------------ 200 - */ 201 202 void oz_elt_stream_put(struct oz_elt_stream *st) 202 203 { 203 204 if (atomic_dec_and_test(&st->ref_count)) { ··· 202 211 } 203 212 } 204 213 205 - /*------------------------------------------------------------------------------ 214 + /* 206 215 * Precondition: Element buffer lock must be held. 207 216 * If this function fails the caller is responsible for deallocating the elt 208 217 * info structure. ··· 266 275 return 0; 267 276 } 268 277 269 - /*------------------------------------------------------------------------------ 270 - */ 271 278 int oz_select_elts_for_tx(struct oz_elt_buf *buf, u8 isoc, unsigned *len, 272 279 unsigned max_len, struct list_head *list) 273 280 { ··· 311 322 return count; 312 323 } 313 324 314 - /*------------------------------------------------------------------------------ 315 - */ 316 325 int oz_are_elts_available(struct oz_elt_buf *buf) 317 326 { 318 327 return buf->order_list.next != &buf->order_list; 319 328 } 320 329 321 - /*------------------------------------------------------------------------------ 322 - */ 323 330 void oz_trim_elt_pool(struct oz_elt_buf *buf) 324 331 { 325 332 struct list_head *free = NULL;
+66 -68
drivers/staging/ozwpan/ozhcd.c
··· 35 35 #include "ozurbparanoia.h" 36 36 #include "ozhcd.h" 37 37 38 - /*------------------------------------------------------------------------------ 38 + /* 39 39 * Number of units of buffering to capture for an isochronous IN endpoint before 40 40 * allowing data to be indicated up. 41 41 */ ··· 57 57 */ 58 58 #define EP0_TIMEOUT_COUNTER 13 59 59 60 - /*------------------------------------------------------------------------------ 60 + /* 61 61 * Used to link urbs together and also store some status information for each 62 62 * urb. 63 63 * A cache of these are kept in a pool to reduce number of calls to kmalloc. ··· 144 144 */ 145 145 #define OZ_HDC_F_SUSPENDED 0x1 146 146 147 - /*------------------------------------------------------------------------------ 147 + /* 148 148 * Static function prototypes. 149 149 */ 150 150 static int oz_hcd_start(struct usb_hcd *hcd); ··· 185 185 struct urb *urb); 186 186 static void oz_hcd_clear_orphanage(struct oz_hcd *ozhcd, int status); 187 187 188 - /*------------------------------------------------------------------------------ 188 + /* 189 189 * Static external variables. 190 190 */ 191 191 static struct platform_device *g_plat_dev; ··· 231 231 }, 232 232 }; 233 233 234 - /*------------------------------------------------------------------------------ 234 + /* 235 235 * Gets our private context area (which is of type struct oz_hcd) from the 236 236 * usb_hcd structure. 237 237 * Context: any ··· 241 241 return (struct oz_hcd *)hcd->hcd_priv; 242 242 } 243 243 244 - /*------------------------------------------------------------------------------ 244 + /* 245 245 * Searches list of ports to find the index of the one with a specified USB 246 246 * bus address. If none of the ports has the bus address then the connection 247 247 * port is returned, if there is one or -1 otherwise. ··· 258 258 return ozhcd->conn_port; 259 259 } 260 260 261 - /*------------------------------------------------------------------------------ 261 + /* 262 262 * Allocates an urb link, first trying the pool but going to heap if empty. 263 263 * Context: any 264 264 */ ··· 279 279 return urbl; 280 280 } 281 281 282 - /*------------------------------------------------------------------------------ 282 + /* 283 283 * Frees an urb link by putting it in the pool if there is enough space or 284 284 * deallocating it to heap otherwise. 285 285 * Context: any ··· 300 300 } 301 301 } 302 302 303 - /*------------------------------------------------------------------------------ 303 + /* 304 304 * Deallocates all the urb links in the pool. 305 305 * Context: unknown 306 306 */ ··· 322 322 } 323 323 } 324 324 325 - /*------------------------------------------------------------------------------ 325 + /* 326 326 * Allocates endpoint structure and optionally a buffer. If a buffer is 327 327 * allocated it immediately follows the endpoint structure. 328 328 * Context: softirq ··· 343 343 return ep; 344 344 } 345 345 346 - /*------------------------------------------------------------------------------ 346 + /* 347 347 * Pre-condition: Must be called with g_tasklet_lock held and interrupts 348 348 * disabled. 349 349 * Context: softirq or process ··· 363 363 return NULL; 364 364 } 365 365 366 - /*------------------------------------------------------------------------------ 366 + /* 367 367 * This is called when we have finished processing an urb. It unlinks it from 368 368 * the ep and returns it to the core. 369 369 * Context: softirq or process ··· 407 407 oz_free_urb_link(cancel_urbl); 408 408 } 409 409 410 - /*------------------------------------------------------------------------------ 410 + /* 411 411 * Deallocates an endpoint including deallocating any associated stream and 412 412 * returning any queued urbs to the core. 413 413 * Context: softirq ··· 432 432 kfree(ep); 433 433 } 434 434 435 - /*------------------------------------------------------------------------------ 435 + /* 436 436 * Context: softirq 437 437 */ 438 438 static void oz_complete_buffered_urb(struct oz_port *port, ··· 471 471 oz_complete_urb(port->ozhcd->hcd, urb, 0); 472 472 } 473 473 474 - /*------------------------------------------------------------------------------ 474 + /* 475 475 * Context: softirq 476 476 */ 477 477 static int oz_enqueue_ep_urb(struct oz_port *port, u8 ep_addr, int in_dir, ··· 543 543 return err; 544 544 } 545 545 546 - /*------------------------------------------------------------------------------ 546 + /* 547 547 * Removes an urb from the queue in the endpoint. 548 548 * Returns 0 if it is found and -EIDRM otherwise. 549 549 * Context: softirq ··· 576 576 return urbl ? 0 : -EIDRM; 577 577 } 578 578 579 - /*------------------------------------------------------------------------------ 579 + /* 580 580 * Finds an urb given its request id. 581 581 * Context: softirq 582 582 */ ··· 609 609 return urb; 610 610 } 611 611 612 - /*------------------------------------------------------------------------------ 612 + /* 613 613 * Pre-condition: Port lock must be held. 614 614 * Context: softirq 615 615 */ ··· 624 624 port->hpd = hpd; 625 625 } 626 626 627 - /*------------------------------------------------------------------------------ 627 + /* 628 628 * Context: softirq 629 629 */ 630 630 static struct oz_hcd *oz_hcd_claim(void) ··· 639 639 return ozhcd; 640 640 } 641 641 642 - /*------------------------------------------------------------------------------ 642 + /* 643 643 * Context: softirq 644 644 */ 645 645 static inline void oz_hcd_put(struct oz_hcd *ozhcd) ··· 648 648 usb_put_hcd(ozhcd->hcd); 649 649 } 650 650 651 - /*------------------------------------------------------------------------------ 651 + /* 652 652 * This is called by the protocol handler to notify that a PD has arrived. 653 653 * We allocate a port to associate with the PD and create a structure for 654 654 * endpoint 0. This port is made the connection port. ··· 714 714 return NULL; 715 715 } 716 716 717 - /*------------------------------------------------------------------------------ 717 + /* 718 718 * This is called by the protocol handler to notify that the PD has gone away. 719 719 * We need to deallocate all resources and then request that the root hub is 720 720 * polled. We release the reference we hold on the PD. ··· 770 770 oz_usb_put(hpd); 771 771 } 772 772 773 - /*------------------------------------------------------------------------------ 773 + /* 774 774 * Context: softirq 775 775 */ 776 776 void oz_hcd_pd_reset(void *hpd, void *hport) ··· 790 790 usb_hcd_poll_rh_status(ozhcd->hcd); 791 791 } 792 792 793 - /*------------------------------------------------------------------------------ 793 + /* 794 794 * Context: softirq 795 795 */ 796 796 void oz_hcd_get_desc_cnf(void *hport, u8 req_id, int status, const u8 *desc, ··· 836 836 oz_complete_urb(port->ozhcd->hcd, urb, 0); 837 837 } 838 838 839 - /*------------------------------------------------------------------------------ 839 + /* 840 840 * Context: softirq 841 841 */ 842 842 static void oz_display_conf_type(u8 t) ··· 878 878 } 879 879 } 880 880 881 - /*------------------------------------------------------------------------------ 881 + /* 882 882 * Context: softirq 883 883 */ 884 884 static void oz_hcd_complete_set_config(struct oz_port *port, struct urb *urb, ··· 900 900 oz_complete_urb(hcd, urb, rc); 901 901 } 902 902 903 - /*------------------------------------------------------------------------------ 903 + /* 904 904 * Context: softirq 905 905 */ 906 906 static void oz_hcd_complete_set_interface(struct oz_port *port, struct urb *urb, ··· 927 927 oz_complete_urb(hcd, urb, rc); 928 928 } 929 929 930 - /*------------------------------------------------------------------------------ 930 + /* 931 931 * Context: softirq 932 932 */ 933 933 void oz_hcd_control_cnf(void *hport, u8 req_id, u8 rcode, const u8 *data, ··· 980 980 } 981 981 } 982 982 983 - /*------------------------------------------------------------------------------ 983 + /* 984 984 * Context: softirq-serialized 985 985 */ 986 986 static int oz_hcd_buffer_data(struct oz_endpoint *ep, const u8 *data, ··· 1018 1018 return 0; 1019 1019 } 1020 1020 1021 - /*------------------------------------------------------------------------------ 1021 + /* 1022 1022 * Context: softirq-serialized 1023 1023 */ 1024 1024 void oz_hcd_data_ind(void *hport, u8 endpoint, const u8 *data, int data_len) ··· 1065 1065 spin_unlock_bh(&ozhcd->hcd_lock); 1066 1066 } 1067 1067 1068 - /*------------------------------------------------------------------------------ 1068 + /* 1069 1069 * Context: unknown 1070 1070 */ 1071 1071 static inline int oz_usb_get_frame_number(void) ··· 1073 1073 return atomic_inc_return(&g_usb_frame_number); 1074 1074 } 1075 1075 1076 - /*------------------------------------------------------------------------------ 1076 + /* 1077 1077 * Context: softirq 1078 1078 */ 1079 1079 int oz_hcd_heartbeat(void *hport) ··· 1234 1234 return rc; 1235 1235 } 1236 1236 1237 - /*------------------------------------------------------------------------------ 1237 + /* 1238 1238 * Context: softirq 1239 1239 */ 1240 1240 static int oz_build_endpoints_for_interface(struct usb_hcd *hcd, ··· 1315 1315 return 0; 1316 1316 } 1317 1317 1318 - /*------------------------------------------------------------------------------ 1318 + /* 1319 1319 * Context: softirq 1320 1320 */ 1321 1321 static void oz_clean_endpoints_for_interface(struct usb_hcd *hcd, ··· 1361 1361 } 1362 1362 } 1363 1363 1364 - /*------------------------------------------------------------------------------ 1364 + /* 1365 1365 * Context: softirq 1366 1366 */ 1367 1367 static int oz_build_endpoints_for_config(struct usb_hcd *hcd, ··· 1397 1397 return -1; 1398 1398 } 1399 1399 1400 - /*------------------------------------------------------------------------------ 1400 + /* 1401 1401 * Context: softirq 1402 1402 */ 1403 1403 static void oz_clean_endpoints_for_config(struct usb_hcd *hcd, ··· 1419 1419 spin_unlock_bh(&ozhcd->hcd_lock); 1420 1420 } 1421 1421 1422 - /*------------------------------------------------------------------------------ 1422 + /* 1423 1423 * Context: tasklet 1424 1424 */ 1425 1425 static void *oz_claim_hpd(struct oz_port *port) ··· 1435 1435 return hpd; 1436 1436 } 1437 1437 1438 - /*------------------------------------------------------------------------------ 1438 + /* 1439 1439 * Context: tasklet 1440 1440 */ 1441 1441 static void oz_process_ep0_urb(struct oz_hcd *ozhcd, struct urb *urb, ··· 1582 1582 } 1583 1583 } 1584 1584 1585 - /*------------------------------------------------------------------------------ 1585 + /* 1586 1586 * Context: tasklet 1587 1587 */ 1588 1588 static int oz_urb_process(struct oz_hcd *ozhcd, struct urb *urb) ··· 1617 1617 return rc; 1618 1618 } 1619 1619 1620 - /*------------------------------------------------------------------------------ 1620 + /* 1621 1621 * Context: tasklet 1622 1622 */ 1623 1623 static void oz_urb_process_tasklet(unsigned long unused) ··· 1651 1651 oz_hcd_put(ozhcd); 1652 1652 } 1653 1653 1654 - /*------------------------------------------------------------------------------ 1654 + /* 1655 1655 * This function searches for the urb in any of the lists it could be in. 1656 1656 * If it is found it is removed from the list and completed. If the urb is 1657 1657 * being processed then it won't be in a list so won't be found. However, the ··· 1719 1719 } 1720 1720 } 1721 1721 1722 - /*------------------------------------------------------------------------------ 1722 + /* 1723 1723 * Context: tasklet 1724 1724 */ 1725 1725 static void oz_urb_cancel_tasklet(unsigned long unused) ··· 1747 1747 oz_hcd_put(ozhcd); 1748 1748 } 1749 1749 1750 - /*------------------------------------------------------------------------------ 1750 + /* 1751 1751 * Context: unknown 1752 1752 */ 1753 1753 static void oz_hcd_clear_orphanage(struct oz_hcd *ozhcd, int status) ··· 1764 1764 } 1765 1765 } 1766 1766 1767 - /*------------------------------------------------------------------------------ 1767 + /* 1768 1768 * Context: unknown 1769 1769 */ 1770 1770 static int oz_hcd_start(struct usb_hcd *hcd) ··· 1775 1775 return 0; 1776 1776 } 1777 1777 1778 - /*------------------------------------------------------------------------------ 1778 + /* 1779 1779 * Context: unknown 1780 1780 */ 1781 1781 static void oz_hcd_stop(struct usb_hcd *hcd) 1782 1782 { 1783 1783 } 1784 1784 1785 - /*------------------------------------------------------------------------------ 1785 + /* 1786 1786 * Context: unknown 1787 1787 */ 1788 1788 static void oz_hcd_shutdown(struct usb_hcd *hcd) 1789 1789 { 1790 1790 } 1791 1791 1792 - /*------------------------------------------------------------------------------ 1792 + /* 1793 1793 * Called to queue an urb for the device. 1794 1794 * This function should return a non-zero error code if it fails the urb but 1795 1795 * should not call usb_hcd_giveback_urb(). ··· 1847 1847 return 0; 1848 1848 } 1849 1849 1850 - /*------------------------------------------------------------------------------ 1850 + /* 1851 1851 * Context: tasklet 1852 1852 */ 1853 1853 static struct oz_urb_link *oz_remove_urb(struct oz_endpoint *ep, ··· 1873 1873 return NULL; 1874 1874 } 1875 1875 1876 - /*------------------------------------------------------------------------------ 1876 + /* 1877 1877 * Called to dequeue a previously submitted urb for the device. 1878 1878 * Context: any 1879 1879 */ ··· 1915 1915 return rc; 1916 1916 } 1917 1917 1918 - /*------------------------------------------------------------------------------ 1918 + /* 1919 1919 * Context: unknown 1920 1920 */ 1921 1921 static void oz_hcd_endpoint_disable(struct usb_hcd *hcd, ··· 1923 1923 { 1924 1924 } 1925 1925 1926 - /*------------------------------------------------------------------------------ 1926 + /* 1927 1927 * Context: unknown 1928 1928 */ 1929 1929 static void oz_hcd_endpoint_reset(struct usb_hcd *hcd, ··· 1931 1931 { 1932 1932 } 1933 1933 1934 - /*------------------------------------------------------------------------------ 1934 + /* 1935 1935 * Context: unknown 1936 1936 */ 1937 1937 static int oz_hcd_get_frame_number(struct usb_hcd *hcd) ··· 1940 1940 return oz_usb_get_frame_number(); 1941 1941 } 1942 1942 1943 - /*------------------------------------------------------------------------------ 1943 + /* 1944 1944 * Context: softirq 1945 1945 * This is called as a consquence of us calling usb_hcd_poll_rh_status() and we 1946 1946 * always do that in softirq context. ··· 1971 1971 return 0; 1972 1972 } 1973 1973 1974 - /*------------------------------------------------------------------------------ 1974 + /* 1975 1975 * Context: process 1976 1976 */ 1977 1977 static void oz_get_hub_descriptor(struct usb_hcd *hcd, ··· 1985 1985 desc->bNbrPorts = OZ_NB_PORTS; 1986 1986 } 1987 1987 1988 - /*------------------------------------------------------------------------------ 1988 + /* 1989 1989 * Context: process 1990 1990 */ 1991 1991 static int oz_set_port_feature(struct usb_hcd *hcd, u16 wvalue, u16 windex) ··· 2061 2061 return err; 2062 2062 } 2063 2063 2064 - /*------------------------------------------------------------------------------ 2064 + /* 2065 2065 * Context: process 2066 2066 */ 2067 2067 static int oz_clear_port_feature(struct usb_hcd *hcd, u16 wvalue, u16 windex) ··· 2137 2137 return err; 2138 2138 } 2139 2139 2140 - /*------------------------------------------------------------------------------ 2140 + /* 2141 2141 * Context: process 2142 2142 */ 2143 2143 static int oz_get_port_status(struct usb_hcd *hcd, u16 windex, char *buf) ··· 2155 2155 return 0; 2156 2156 } 2157 2157 2158 - /*------------------------------------------------------------------------------ 2158 + /* 2159 2159 * Context: process 2160 2160 */ 2161 2161 static int oz_hcd_hub_control(struct usb_hcd *hcd, u16 req_type, u16 wvalue, ··· 2193 2193 return err; 2194 2194 } 2195 2195 2196 - /*------------------------------------------------------------------------------ 2196 + /* 2197 2197 * Context: process 2198 2198 */ 2199 2199 static int oz_hcd_bus_suspend(struct usb_hcd *hcd) ··· 2208 2208 return 0; 2209 2209 } 2210 2210 2211 - /*------------------------------------------------------------------------------ 2211 + /* 2212 2212 * Context: process 2213 2213 */ 2214 2214 static int oz_hcd_bus_resume(struct usb_hcd *hcd) ··· 2223 2223 return 0; 2224 2224 } 2225 2225 2226 - /*------------------------------------------------------------------------------ 2227 - */ 2228 2226 static void oz_plat_shutdown(struct platform_device *dev) 2229 2227 { 2230 2228 } 2231 2229 2232 - /*------------------------------------------------------------------------------ 2230 + /* 2233 2231 * Context: process 2234 2232 */ 2235 2233 static int oz_plat_probe(struct platform_device *dev) ··· 2270 2272 return 0; 2271 2273 } 2272 2274 2273 - /*------------------------------------------------------------------------------ 2275 + /* 2274 2276 * Context: unknown 2275 2277 */ 2276 2278 static int oz_plat_remove(struct platform_device *dev) ··· 2294 2296 return 0; 2295 2297 } 2296 2298 2297 - /*------------------------------------------------------------------------------ 2299 + /* 2298 2300 * Context: unknown 2299 2301 */ 2300 2302 static int oz_plat_suspend(struct platform_device *dev, pm_message_t msg) ··· 2303 2305 } 2304 2306 2305 2307 2306 - /*------------------------------------------------------------------------------ 2308 + /* 2307 2309 * Context: unknown 2308 2310 */ 2309 2311 static int oz_plat_resume(struct platform_device *dev) ··· 2311 2313 return 0; 2312 2314 } 2313 2315 2314 - /*------------------------------------------------------------------------------ 2316 + /* 2315 2317 * Context: process 2316 2318 */ 2317 2319 int oz_hcd_init(void) ··· 2348 2350 return err; 2349 2351 } 2350 2352 2351 - /*------------------------------------------------------------------------------ 2353 + /* 2352 2354 * Context: process 2353 2355 */ 2354 2356 void oz_hcd_term(void)
+3 -5
drivers/staging/ozwpan/ozmain.c
··· 18 18 19 19 unsigned int oz_dbg_mask = OZ_DEFAULT_DBG_MASK; 20 20 21 - /*------------------------------------------------------------------------------ 21 + /* 22 22 * The name of the 802.11 mac device. Empty string is the default value but a 23 23 * value can be supplied as a parameter to the module. An empty string means 24 24 * bind to nothing. '*' means bind to all netcards - this includes non-802.11 ··· 26 26 */ 27 27 static char *g_net_dev = ""; 28 28 29 - /*------------------------------------------------------------------------------ 29 + /* 30 30 * Context: process 31 31 */ 32 32 static int __init ozwpan_init(void) ··· 38 38 return 0; 39 39 } 40 40 41 - /*------------------------------------------------------------------------------ 41 + /* 42 42 * Context: process 43 43 */ 44 44 static void __exit ozwpan_exit(void) ··· 48 48 oz_cdev_deregister(); 49 49 } 50 50 51 - /*------------------------------------------------------------------------------ 52 - */ 53 51 module_param(g_net_dev, charp, S_IRUGO); 54 52 module_init(ozwpan_init); 55 53 module_exit(ozwpan_exit);
+39 -43
drivers/staging/ozwpan/ozpd.c
··· 21 21 #include <linux/uaccess.h> 22 22 #include <net/psnap.h> 23 23 24 - /*------------------------------------------------------------------------------ 25 - */ 26 24 #define OZ_MAX_TX_POOL_SIZE 6 27 25 28 - /*------------------------------------------------------------------------------ 29 - */ 30 26 static struct oz_tx_frame *oz_tx_frame_alloc(struct oz_pd *pd); 31 27 static void oz_tx_frame_free(struct oz_pd *pd, struct oz_tx_frame *f); 32 28 static void oz_tx_isoc_free(struct oz_pd *pd, struct oz_tx_frame *f); ··· 38 42 static void oz_def_app_stop(struct oz_pd *pd, int pause); 39 43 static void oz_def_app_rx(struct oz_pd *pd, struct oz_elt *elt); 40 44 41 - /*------------------------------------------------------------------------------ 45 + /* 42 46 * Counts the uncompleted isoc frames submitted to netcard. 43 47 */ 44 48 static atomic_t g_submitted_isoc = ATOMIC_INIT(0); ··· 83 87 OZ_APPID_SERIAL}, 84 88 }; 85 89 86 - /*------------------------------------------------------------------------------ 90 + /* 87 91 * Context: process 88 92 */ 89 93 static int oz_def_app_init(void) ··· 91 95 return 0; 92 96 } 93 97 94 - /*------------------------------------------------------------------------------ 98 + /* 95 99 * Context: process 96 100 */ 97 101 static void oz_def_app_term(void) 98 102 { 99 103 } 100 104 101 - /*------------------------------------------------------------------------------ 105 + /* 102 106 * Context: softirq 103 107 */ 104 108 static int oz_def_app_start(struct oz_pd *pd, int resume) ··· 106 110 return 0; 107 111 } 108 112 109 - /*------------------------------------------------------------------------------ 113 + /* 110 114 * Context: softirq 111 115 */ 112 116 static void oz_def_app_stop(struct oz_pd *pd, int pause) 113 117 { 114 118 } 115 119 116 - /*------------------------------------------------------------------------------ 120 + /* 117 121 * Context: softirq 118 122 */ 119 123 static void oz_def_app_rx(struct oz_pd *pd, struct oz_elt *elt) 120 124 { 121 125 } 122 126 123 - /*------------------------------------------------------------------------------ 127 + /* 124 128 * Context: softirq or process 125 129 */ 126 130 void oz_pd_set_state(struct oz_pd *pd, unsigned state) ··· 142 146 } 143 147 } 144 148 145 - /*------------------------------------------------------------------------------ 149 + /* 146 150 * Context: softirq or process 147 151 */ 148 152 void oz_pd_get(struct oz_pd *pd) ··· 150 154 atomic_inc(&pd->ref_count); 151 155 } 152 156 153 - /*------------------------------------------------------------------------------ 157 + /* 154 158 * Context: softirq or process 155 159 */ 156 160 void oz_pd_put(struct oz_pd *pd) ··· 159 163 oz_pd_destroy(pd); 160 164 } 161 165 162 - /*------------------------------------------------------------------------------ 166 + /* 163 167 * Context: softirq-serialized 164 168 */ 165 169 struct oz_pd *oz_pd_alloc(const u8 *mac_addr) ··· 197 201 return pd; 198 202 } 199 203 200 - /*------------------------------------------------------------------------------ 204 + /* 201 205 * Context: softirq or process 202 206 */ 203 207 void oz_pd_free(struct work_struct *work) ··· 252 256 kfree(pd); 253 257 } 254 258 255 - /*------------------------------------------------------------------------------ 259 + /* 256 260 * Context: softirq or Process 257 261 */ 258 262 void oz_pd_destroy(struct oz_pd *pd) ··· 267 271 oz_pd_dbg(pd, ON, "failed to schedule workitem\n"); 268 272 } 269 273 270 - /*------------------------------------------------------------------------------ 274 + /* 271 275 * Context: softirq-serialized 272 276 */ 273 277 int oz_services_start(struct oz_pd *pd, u16 apps, int resume) ··· 295 299 return rc; 296 300 } 297 301 298 - /*------------------------------------------------------------------------------ 302 + /* 299 303 * Context: softirq or process 300 304 */ 301 305 void oz_services_stop(struct oz_pd *pd, u16 apps, int pause) ··· 318 322 } 319 323 } 320 324 321 - /*------------------------------------------------------------------------------ 325 + /* 322 326 * Context: softirq 323 327 */ 324 328 void oz_pd_heartbeat(struct oz_pd *pd, u16 apps) ··· 341 345 } 342 346 } 343 347 344 - /*------------------------------------------------------------------------------ 348 + /* 345 349 * Context: softirq or process 346 350 */ 347 351 void oz_pd_stop(struct oz_pd *pd) ··· 365 369 oz_pd_put(pd); 366 370 } 367 371 368 - /*------------------------------------------------------------------------------ 372 + /* 369 373 * Context: softirq 370 374 */ 371 375 int oz_pd_sleep(struct oz_pd *pd) ··· 394 398 return do_stop; 395 399 } 396 400 397 - /*------------------------------------------------------------------------------ 401 + /* 398 402 * Context: softirq 399 403 */ 400 404 static struct oz_tx_frame *oz_tx_frame_alloc(struct oz_pd *pd) ··· 418 422 return f; 419 423 } 420 424 421 - /*------------------------------------------------------------------------------ 425 + /* 422 426 * Context: softirq or process 423 427 */ 424 428 static void oz_tx_isoc_free(struct oz_pd *pd, struct oz_tx_frame *f) ··· 436 440 pd->nb_queued_isoc_frames); 437 441 } 438 442 439 - /*------------------------------------------------------------------------------ 443 + /* 440 444 * Context: softirq or process 441 445 */ 442 446 static void oz_tx_frame_free(struct oz_pd *pd, struct oz_tx_frame *f) ··· 452 456 kfree(f); 453 457 } 454 458 455 - /*------------------------------------------------------------------------------ 459 + /* 456 460 * Context: softirq-serialized 457 461 */ 458 462 static void oz_set_more_bit(struct sk_buff *skb) ··· 462 466 oz_hdr->control |= OZ_F_MORE_DATA; 463 467 } 464 468 465 - /*------------------------------------------------------------------------------ 469 + /* 466 470 * Context: softirq-serialized 467 471 */ 468 472 static void oz_set_last_pkt_nb(struct oz_pd *pd, struct sk_buff *skb) ··· 472 476 oz_hdr->last_pkt_num = pd->trigger_pkt_num & OZ_LAST_PN_MASK; 473 477 } 474 478 475 - /*------------------------------------------------------------------------------ 479 + /* 476 480 * Context: softirq 477 481 */ 478 482 int oz_prepare_frame(struct oz_pd *pd, int empty) ··· 504 508 return 0; 505 509 } 506 510 507 - /*------------------------------------------------------------------------------ 511 + /* 508 512 * Context: softirq-serialized 509 513 */ 510 514 static struct sk_buff *oz_build_frame(struct oz_pd *pd, struct oz_tx_frame *f) ··· 550 554 return NULL; 551 555 } 552 556 553 - /*------------------------------------------------------------------------------ 557 + /* 554 558 * Context: softirq or process 555 559 */ 556 560 static void oz_retire_frame(struct oz_pd *pd, struct oz_tx_frame *f) ··· 574 578 oz_trim_elt_pool(&pd->elt_buff); 575 579 } 576 580 577 - /*------------------------------------------------------------------------------ 581 + /* 578 582 * Context: softirq-serialized 579 583 */ 580 584 static int oz_send_next_queued_frame(struct oz_pd *pd, int more_data) ··· 629 633 return 0; 630 634 } 631 635 632 - /*------------------------------------------------------------------------------ 636 + /* 633 637 * Context: softirq-serialized 634 638 */ 635 639 void oz_send_queued_frames(struct oz_pd *pd, int backlog) ··· 668 672 oz_send_next_queued_frame(pd, 0); 669 673 } 670 674 671 - /*------------------------------------------------------------------------------ 675 + /* 672 676 * Context: softirq 673 677 */ 674 678 static int oz_send_isoc_frame(struct oz_pd *pd) ··· 718 722 return 0; 719 723 } 720 724 721 - /*------------------------------------------------------------------------------ 725 + /* 722 726 * Context: softirq-serialized 723 727 */ 724 728 void oz_retire_tx_frames(struct oz_pd *pd, u8 lpn) ··· 760 764 } 761 765 } 762 766 763 - /*------------------------------------------------------------------------------ 767 + /* 764 768 * Precondition: stream_lock must be held. 765 769 * Context: softirq 766 770 */ ··· 777 781 return NULL; 778 782 } 779 783 780 - /*------------------------------------------------------------------------------ 784 + /* 781 785 * Context: softirq 782 786 */ 783 787 int oz_isoc_stream_create(struct oz_pd *pd, u8 ep_num) ··· 797 801 return 0; 798 802 } 799 803 800 - /*------------------------------------------------------------------------------ 804 + /* 801 805 * Context: softirq or process 802 806 */ 803 807 static void oz_isoc_stream_free(struct oz_isoc_stream *st) ··· 806 810 kfree(st); 807 811 } 808 812 809 - /*------------------------------------------------------------------------------ 813 + /* 810 814 * Context: softirq 811 815 */ 812 816 int oz_isoc_stream_delete(struct oz_pd *pd, u8 ep_num) ··· 823 827 return 0; 824 828 } 825 829 826 - /*------------------------------------------------------------------------------ 830 + /* 827 831 * Context: any 828 832 */ 829 833 static void oz_isoc_destructor(struct sk_buff *skb) ··· 831 835 atomic_dec(&g_submitted_isoc); 832 836 } 833 837 834 - /*------------------------------------------------------------------------------ 838 + /* 835 839 * Context: softirq 836 840 */ 837 841 int oz_send_isoc_unit(struct oz_pd *pd, u8 ep_num, const u8 *data, int len) ··· 953 957 return 0; 954 958 } 955 959 956 - /*------------------------------------------------------------------------------ 960 + /* 957 961 * Context: process 958 962 */ 959 963 void oz_apps_init(void) ··· 965 969 g_app_if[i].init(); 966 970 } 967 971 968 - /*------------------------------------------------------------------------------ 972 + /* 969 973 * Context: process 970 974 */ 971 975 void oz_apps_term(void) ··· 978 982 g_app_if[i].term(); 979 983 } 980 984 981 - /*------------------------------------------------------------------------------ 985 + /* 982 986 * Context: softirq-serialized 983 987 */ 984 988 void oz_handle_app_elt(struct oz_pd *pd, u8 app_id, struct oz_elt *elt) ··· 991 995 ai->rx(pd, elt); 992 996 } 993 997 994 - /*------------------------------------------------------------------------------ 998 + /* 995 999 * Context: softirq or process 996 1000 */ 997 1001 void oz_pd_indicate_farewells(struct oz_pd *pd)
+24 -32
drivers/staging/ozwpan/ozproto.c
··· 23 23 #include <linux/uaccess.h> 24 24 #include <net/psnap.h> 25 25 26 - /*------------------------------------------------------------------------------ 27 - */ 28 26 #define OZ_CF_CONN_SUCCESS 1 29 27 #define OZ_CF_CONN_FAILURE 2 30 28 ··· 31 33 32 34 #define OZ_MAX_TIMER_POOL_SIZE 16 33 35 34 - /*------------------------------------------------------------------------------ 35 - */ 36 36 struct oz_binding { 37 37 struct packet_type ptype; 38 38 char name[OZ_MAX_BINDING_LEN]; 39 39 struct list_head link; 40 40 }; 41 41 42 - /*------------------------------------------------------------------------------ 42 + /* 43 43 * Static external variables. 44 44 */ 45 45 static DEFINE_SPINLOCK(g_polling_lock); ··· 49 53 static u16 g_apps = 0x1; 50 54 static int g_processing_rx; 51 55 52 - /*------------------------------------------------------------------------------ 56 + /* 53 57 * Context: softirq-serialized 54 58 */ 55 59 static u8 oz_get_new_session_id(u8 exclude) ··· 63 67 return g_session_id; 64 68 } 65 69 66 - /*------------------------------------------------------------------------------ 70 + /* 67 71 * Context: softirq-serialized 68 72 */ 69 73 static void oz_send_conn_rsp(struct oz_pd *pd, u8 status) ··· 109 113 return; 110 114 } 111 115 112 - /*------------------------------------------------------------------------------ 116 + /* 113 117 * Context: softirq-serialized 114 118 */ 115 119 static void pd_set_keepalive(struct oz_pd *pd, u8 kalive) ··· 135 139 oz_dbg(ON, "Keepalive = %lu mSec\n", pd->keep_alive); 136 140 } 137 141 138 - /*------------------------------------------------------------------------------ 142 + /* 139 143 * Context: softirq-serialized 140 144 */ 141 145 static void pd_set_presleep(struct oz_pd *pd, u8 presleep, u8 start_timer) ··· 152 156 oz_dbg(ON, "Presleep time = %lu mSec\n", pd->presleep); 153 157 } 154 158 155 - /*------------------------------------------------------------------------------ 159 + /* 156 160 * Context: softirq-serialized 157 161 */ 158 162 static struct oz_pd *oz_connect_req(struct oz_pd *cur_pd, struct oz_elt *elt, ··· 287 291 return pd; 288 292 } 289 293 290 - /*------------------------------------------------------------------------------ 294 + /* 291 295 * Context: softirq-serialized 292 296 */ 293 297 static void oz_add_farewell(struct oz_pd *pd, u8 ep_num, u8 index, ··· 319 323 kfree(f2); 320 324 } 321 325 322 - /*------------------------------------------------------------------------------ 326 + /* 323 327 * Context: softirq-serialized 324 328 */ 325 329 static void oz_rx_frame(struct sk_buff *skb) ··· 441 445 consume_skb(skb); 442 446 } 443 447 444 - /*------------------------------------------------------------------------------ 448 + /* 445 449 * Context: process 446 450 */ 447 451 void oz_protocol_term(void) ··· 479 483 oz_dbg(ON, "Protocol stopped\n"); 480 484 } 481 485 482 - /*------------------------------------------------------------------------------ 486 + /* 483 487 * Context: softirq 484 488 */ 485 489 void oz_pd_heartbeat_handler(unsigned long data) ··· 496 500 oz_pd_put(pd); 497 501 } 498 502 499 - /*------------------------------------------------------------------------------ 503 + /* 500 504 * Context: softirq 501 505 */ 502 506 void oz_pd_timeout_handler(unsigned long data) ··· 518 522 oz_pd_put(pd); 519 523 } 520 524 521 - /*------------------------------------------------------------------------------ 525 + /* 522 526 * Context: Interrupt 523 527 */ 524 528 enum hrtimer_restart oz_pd_heartbeat_event(struct hrtimer *timer) ··· 533 537 return HRTIMER_RESTART; 534 538 } 535 539 536 - /*------------------------------------------------------------------------------ 540 + /* 537 541 * Context: Interrupt 538 542 */ 539 543 enum hrtimer_restart oz_pd_timeout_event(struct hrtimer *timer) ··· 546 550 return HRTIMER_NORESTART; 547 551 } 548 552 549 - /*------------------------------------------------------------------------------ 553 + /* 550 554 * Context: softirq or process 551 555 */ 552 556 void oz_timer_add(struct oz_pd *pd, int type, unsigned long due_time) ··· 577 581 spin_unlock_bh(&g_polling_lock); 578 582 } 579 583 580 - /*------------------------------------------------------------------------------ 584 + /* 581 585 * Context: softirq or process 582 586 */ 583 587 void oz_pd_request_heartbeat(struct oz_pd *pd) ··· 586 590 pd->pulse_period : OZ_QUANTUM); 587 591 } 588 592 589 - /*------------------------------------------------------------------------------ 593 + /* 590 594 * Context: softirq or process 591 595 */ 592 596 struct oz_pd *oz_pd_find(const u8 *mac_addr) ··· 607 611 return NULL; 608 612 } 609 613 610 - /*------------------------------------------------------------------------------ 614 + /* 611 615 * Context: process 612 616 */ 613 617 void oz_app_enable(int app_id, int enable) ··· 622 626 } 623 627 } 624 628 625 - /*------------------------------------------------------------------------------ 629 + /* 626 630 * Context: softirq 627 631 */ 628 632 static int oz_pkt_recv(struct sk_buff *skb, struct net_device *dev, ··· 657 661 return 0; 658 662 } 659 663 660 - /*------------------------------------------------------------------------------ 664 + /* 661 665 * Context: process 662 666 */ 663 667 void oz_binding_add(const char *net_dev) ··· 691 695 } 692 696 } 693 697 694 - /*------------------------------------------------------------------------------ 698 + /* 695 699 * Context: process 696 700 */ 697 701 static void pd_stop_all_for_device(struct net_device *net_dev) ··· 716 720 } 717 721 } 718 722 719 - /*------------------------------------------------------------------------------ 723 + /* 720 724 * Context: process 721 725 */ 722 726 void oz_binding_remove(const char *net_dev) ··· 745 749 } 746 750 } 747 751 748 - /*------------------------------------------------------------------------------ 752 + /* 749 753 * Context: process 750 754 */ 751 755 static char *oz_get_next_device_name(char *s, char *dname, int max_size) ··· 760 764 return s; 761 765 } 762 766 763 - /*------------------------------------------------------------------------------ 767 + /* 764 768 * Context: process 765 769 */ 766 770 int oz_protocol_init(char *devs) ··· 779 783 return 0; 780 784 } 781 785 782 - /*------------------------------------------------------------------------------ 786 + /* 783 787 * Context: process 784 788 */ 785 789 int oz_get_pd_list(struct oz_mac_addr *addr, int max_count) ··· 799 803 return count; 800 804 } 801 805 802 - /*------------------------------------------------------------------------------ 803 - */ 804 806 void oz_polling_lock_bh(void) 805 807 { 806 808 spin_lock_bh(&g_polling_lock); 807 809 } 808 810 809 - /*------------------------------------------------------------------------------ 810 - */ 811 811 void oz_polling_unlock_bh(void) 812 812 { 813 813 spin_unlock_bh(&g_polling_lock);
+1 -5
drivers/staging/ozwpan/ozurbparanoia.c
··· 10 10 11 11 #include "ozurbparanoia.h" 12 12 13 - /*----------------------------------------------------------------------------- 14 - */ 15 13 #define OZ_MAX_URBS 1000 16 14 struct urb *g_urb_memory[OZ_MAX_URBS]; 17 15 int g_nb_urbs; 18 16 DEFINE_SPINLOCK(g_urb_mem_lock); 19 17 20 - /*----------------------------------------------------------------------------- 21 - */ 22 18 void oz_remember_urb(struct urb *urb) 23 19 { 24 20 unsigned long irq_state; ··· 29 33 spin_unlock_irqrestore(&g_urb_mem_lock, irq_state); 30 34 } 31 35 32 - /*------------------------------------------------------------------------------ 36 + /* 33 37 */ 34 38 int oz_forget_urb(struct urb *urb) 35 39 {
+10 -10
drivers/staging/ozwpan/ozusbsvc.c
··· 28 28 #include "ozhcd.h" 29 29 #include "ozusbsvc.h" 30 30 31 - /*------------------------------------------------------------------------------ 31 + /* 32 32 * This is called once when the driver is loaded to initialise the USB service. 33 33 * Context: process 34 34 */ ··· 37 37 return oz_hcd_init(); 38 38 } 39 39 40 - /*------------------------------------------------------------------------------ 40 + /* 41 41 * This is called once when the driver is unloaded to terminate the USB service. 42 42 * Context: process 43 43 */ ··· 46 46 oz_hcd_term(); 47 47 } 48 48 49 - /*------------------------------------------------------------------------------ 49 + /* 50 50 * This is called when the USB service is started or resumed for a PD. 51 51 * Context: softirq 52 52 */ ··· 111 111 return rc; 112 112 } 113 113 114 - /*------------------------------------------------------------------------------ 114 + /* 115 115 * This is called when the USB service is stopped or paused for a PD. 116 116 * Context: softirq or process 117 117 */ ··· 152 152 } 153 153 } 154 154 155 - /*------------------------------------------------------------------------------ 155 + /* 156 156 * This increments the reference count of the context area for a specific PD. 157 157 * This ensures this context area does not disappear while still in use. 158 158 * Context: softirq ··· 164 164 atomic_inc(&usb_ctx->ref_count); 165 165 } 166 166 167 - /*------------------------------------------------------------------------------ 167 + /* 168 168 * This decrements the reference count of the context area for a specific PD 169 169 * and destroys the context area if the reference count becomes zero. 170 170 * Context: irq or process ··· 180 180 } 181 181 } 182 182 183 - /*------------------------------------------------------------------------------ 183 + /* 184 184 * Context: softirq 185 185 */ 186 186 int oz_usb_heartbeat(struct oz_pd *pd) ··· 205 205 return rc; 206 206 } 207 207 208 - /*------------------------------------------------------------------------------ 208 + /* 209 209 * Context: softirq 210 210 */ 211 211 int oz_usb_stream_create(void *hpd, u8 ep_num) ··· 227 227 return 0; 228 228 } 229 229 230 - /*------------------------------------------------------------------------------ 230 + /* 231 231 * Context: softirq 232 232 */ 233 233 int oz_usb_stream_delete(void *hpd, u8 ep_num) ··· 250 250 return 0; 251 251 } 252 252 253 - /*------------------------------------------------------------------------------ 253 + /* 254 254 * Context: softirq or process 255 255 */ 256 256 void oz_usb_request_heartbeat(void *hpd)
+11 -13
drivers/staging/ozwpan/ozusbsvc1.c
··· 22 22 #include "ozhcd.h" 23 23 #include "ozusbsvc.h" 24 24 25 - /*------------------------------------------------------------------------------ 26 - */ 27 25 #define MAX_ISOC_FIXED_DATA (253-sizeof(struct oz_isoc_fixed)) 28 26 29 - /*------------------------------------------------------------------------------ 27 + /* 30 28 * Context: softirq 31 29 */ 32 30 static int oz_usb_submit_elt(struct oz_elt_buf *eb, struct oz_elt_info *ei, ··· 51 53 return ret; 52 54 } 53 55 54 - /*------------------------------------------------------------------------------ 56 + /* 55 57 * Context: softirq 56 58 */ 57 59 int oz_usb_get_desc_req(void *hpd, u8 req_id, u8 req_type, u8 desc_type, ··· 88 90 return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0); 89 91 } 90 92 91 - /*------------------------------------------------------------------------------ 93 + /* 92 94 * Context: tasklet 93 95 */ 94 96 static int oz_usb_set_config_req(void *hpd, u8 req_id, u8 index) ··· 111 113 return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0); 112 114 } 113 115 114 - /*------------------------------------------------------------------------------ 116 + /* 115 117 * Context: tasklet 116 118 */ 117 119 static int oz_usb_set_interface_req(void *hpd, u8 req_id, u8 index, u8 alt) ··· 135 137 return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0); 136 138 } 137 139 138 - /*------------------------------------------------------------------------------ 140 + /* 139 141 * Context: tasklet 140 142 */ 141 143 static int oz_usb_set_clear_feature_req(void *hpd, u8 req_id, u8 type, ··· 161 163 return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0); 162 164 } 163 165 164 - /*------------------------------------------------------------------------------ 166 + /* 165 167 * Context: tasklet 166 168 */ 167 169 static int oz_usb_vendor_class_req(void *hpd, u8 req_id, u8 req_type, ··· 190 192 return oz_usb_submit_elt(eb, ei, usb_ctx, 0, 0); 191 193 } 192 194 193 - /*------------------------------------------------------------------------------ 195 + /* 194 196 * Context: tasklet 195 197 */ 196 198 int oz_usb_control_req(void *hpd, u8 req_id, struct usb_ctrlrequest *setup, ··· 239 241 return rc; 240 242 } 241 243 242 - /*------------------------------------------------------------------------------ 244 + /* 243 245 * Context: softirq 244 246 */ 245 247 int oz_usb_send_isoc(void *hpd, u8 ep_num, struct urb *urb) ··· 311 313 return 0; 312 314 } 313 315 314 - /*------------------------------------------------------------------------------ 316 + /* 315 317 * Context: softirq-serialized 316 318 */ 317 319 static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx, ··· 355 357 356 358 } 357 359 358 - /*------------------------------------------------------------------------------ 360 + /* 359 361 * This is called when the PD has received a USB element. The type of element 360 362 * is determined and is then passed to an appropriate handler function. 361 363 * Context: softirq-serialized ··· 428 430 oz_usb_put(usb_ctx); 429 431 } 430 432 431 - /*------------------------------------------------------------------------------ 433 + /* 432 434 * Context: softirq, process 433 435 */ 434 436 void oz_usb_farewell(struct oz_pd *pd, u8 ep_num, u8 *data, u8 len)