aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-12-15 01:04:57 -0500
committerJeff Garzik <jeff@garzik.org>2007-12-17 20:33:12 -0500
commit0d02f0b22b678b9d6c8ac8cad7b4cfbbdf6fab18 (patch)
tree27b5f5afcff7450f37432f30661e56337313c5e9 /drivers
parent4e5200334e03e5620aa19d538300c13db270a063 (diff)
libata-acpi: adjust constness in ata_acpi_gtm/stm() parameters
* No internal function uses const ata_port. Drop const from @ap. * Make ata_acpi_stm() copy @stm before using it and change @stm to const. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-acpi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 545ea865ceb5..8ae36ad029c5 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -200,7 +200,7 @@ void ata_acpi_associate(struct ata_host *host)
200 * RETURNS: 200 * RETURNS:
201 * 0 on success, -ENOENT if _GTM doesn't exist, -errno on failure. 201 * 0 on success, -ENOENT if _GTM doesn't exist, -errno on failure.
202 */ 202 */
203int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm) 203int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *gtm)
204{ 204{
205 struct acpi_buffer output = { .length = ACPI_ALLOCATE_BUFFER }; 205 struct acpi_buffer output = { .length = ACPI_ALLOCATE_BUFFER };
206 union acpi_object *out_obj; 206 union acpi_object *out_obj;
@@ -259,15 +259,16 @@ EXPORT_SYMBOL_GPL(ata_acpi_gtm);
259 * RETURNS: 259 * RETURNS:
260 * 0 on success, -ENOENT if _STM doesn't exist, -errno on failure. 260 * 0 on success, -ENOENT if _STM doesn't exist, -errno on failure.
261 */ 261 */
262int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm) 262int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm)
263{ 263{
264 acpi_status status; 264 acpi_status status;
265 struct ata_acpi_gtm stm_buf = *stm;
265 struct acpi_object_list input; 266 struct acpi_object_list input;
266 union acpi_object in_params[3]; 267 union acpi_object in_params[3];
267 268
268 in_params[0].type = ACPI_TYPE_BUFFER; 269 in_params[0].type = ACPI_TYPE_BUFFER;
269 in_params[0].buffer.length = sizeof(struct ata_acpi_gtm); 270 in_params[0].buffer.length = sizeof(struct ata_acpi_gtm);
270 in_params[0].buffer.pointer = (u8 *)stm; 271 in_params[0].buffer.pointer = (u8 *)&stm_buf;
271 /* Buffers for id may need byteswapping ? */ 272 /* Buffers for id may need byteswapping ? */
272 in_params[1].type = ACPI_TYPE_BUFFER; 273 in_params[1].type = ACPI_TYPE_BUFFER;
273 in_params[1].buffer.length = 512; 274 in_params[1].buffer.length = 512;