pch_phub.c (4ba24fef3eb3b142197135223b90ced2f319cd53) | pch_phub.c (85f4f39c80e9350da8a351e6ea36367fa9fb87a5) |
---|---|
1/* 2 * Copyright (C) 2011 LAPIS Semiconductor Co., Ltd. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; version 2 of the License. 7 * 8 * This program is distributed in the hope that it will be useful, --- 489 unchanged lines hidden (view full) --- 498 unsigned char rom_length; 499 unsigned int tmp; 500 unsigned int addr_offset; 501 unsigned int orom_size; 502 int ret; 503 int err; 504 ssize_t rom_size; 505 | 1/* 2 * Copyright (C) 2011 LAPIS Semiconductor Co., Ltd. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; version 2 of the License. 7 * 8 * This program is distributed in the hope that it will be useful, --- 489 unchanged lines hidden (view full) --- 498 unsigned char rom_length; 499 unsigned int tmp; 500 unsigned int addr_offset; 501 unsigned int orom_size; 502 int ret; 503 int err; 504 ssize_t rom_size; 505 |
506 struct pch_phub_reg *chip = 507 dev_get_drvdata(container_of(kobj, struct device, kobj)); | 506 struct pch_phub_reg *chip = dev_get_drvdata(kobj_to_dev(kobj)); |
508 509 ret = mutex_lock_interruptible(&pch_phub_mutex); 510 if (ret) { 511 err = -ERESTARTSYS; 512 goto return_err_nomutex; 513 } 514 515 /* Get Rom signature */ --- 46 unchanged lines hidden (view full) --- 562static ssize_t pch_phub_bin_write(struct file *filp, struct kobject *kobj, 563 struct bin_attribute *attr, 564 char *buf, loff_t off, size_t count) 565{ 566 int err; 567 unsigned int addr_offset; 568 int ret; 569 ssize_t rom_size; | 507 508 ret = mutex_lock_interruptible(&pch_phub_mutex); 509 if (ret) { 510 err = -ERESTARTSYS; 511 goto return_err_nomutex; 512 } 513 514 /* Get Rom signature */ --- 46 unchanged lines hidden (view full) --- 561static ssize_t pch_phub_bin_write(struct file *filp, struct kobject *kobj, 562 struct bin_attribute *attr, 563 char *buf, loff_t off, size_t count) 564{ 565 int err; 566 unsigned int addr_offset; 567 int ret; 568 ssize_t rom_size; |
570 struct pch_phub_reg *chip = 571 dev_get_drvdata(container_of(kobj, struct device, kobj)); | 569 struct pch_phub_reg *chip = dev_get_drvdata(kobj_to_dev(kobj)); |
572 573 ret = mutex_lock_interruptible(&pch_phub_mutex); 574 if (ret) 575 return -ERESTARTSYS; 576 577 if (off > PCH_PHUB_OROM_SIZE) { 578 addr_offset = 0; 579 goto return_ok; --- 319 unchanged lines hidden --- | 570 571 ret = mutex_lock_interruptible(&pch_phub_mutex); 572 if (ret) 573 return -ERESTARTSYS; 574 575 if (off > PCH_PHUB_OROM_SIZE) { 576 addr_offset = 0; 577 goto return_ok; --- 319 unchanged lines hidden --- |